Before starting with the Zufall project I decided I’d revamp the Pink & Yellow Media Blog and move it from Blogger to our own server. Having had great success with WordPress on both AndNowYouKnow.net and Dabbler.ca I decided to relaunch this blog using the same system. Should be easy enough seeing as I already have two other blogs running on the same server and I know how to set it up properly.
Staying true to the promise I made to switch to Microsoft Expression for all my work for a month I created a new site in Expression Web and started editing and uploading the files. For those of you familliar with WordPress installing the blogging software is very easy: All you have to do is unpack the zipped folder you get from their web site, make the necessary changes (username, data base name, password and such) to the wp-congig.php file and upload the whole package to your desired location on the web. Once uploaded a simple 3-step process is all that’s needed to take your blog live and away we go. Or at least that’s how it’s supposed to work.
Whitespace? What whitespace?
After uploading all the files to my recently created subdomain blog.pinkandyellow.com I went to my browser and entered the address for the setup files. To my surprise I was met with a generated error message on the top stating:
Warning: Cannot modify header information - headers already sent by (output started at ../wordpress/wp-config.php:1) etc etc
Now all you WordPress experts will undoubtedly scuff and say that it’s simply a white space problem and point me to the Troubleshooting FAQ. If only it were that simple. As you can tell from the error message the problem should be in line 1 which only contains the <?php tag and nothing else. If the Troubleshooting FAQ was to be believed there was some extra white space in line 1 that needed to be deleted. Not so. In fact, there was no white space in the entire file no matter what program I used to inspect it (including Expression Web, Dreamweaver and even NotePad++). I theorized that there might have been something else wrong with the files so I deleted the entire site from the server, downloaded a fresh copy of WordPress, replaced all the files in my local folder, reset the wp-config.php file and uploaded the whole package to my server again. Same result.
At this point I started suspecting that there might be something wrong with the way Expression Web was uploading the files. To test this I deleted the files from the server using the site features on the server itself and uploaded the unaltered files to the server using DreamWeaver instead. To my surprise and confusion the error message was no longer there. To make sure this wasn’t a fluke I uploaded the whole site to a sub folder using Expression Web and the error message reemerged.
The conclusion
It seems like Microsoft Expression Web does something to php files on upload. What I don’t know but in all likelyhood it has something to do with whitespace. The program has a function for eliminating white space in html files that I didn’t test but seeing as the files were clean to begin with this shuldn’t have any effect (and the function was turned off anyway). Unless there is something I’m missing there must be some form of bug sneaking around inside the program that causes this issue. The question is if it’s a one-time occurence or if this is something that happens to all php files – in which case there is something seriously wrong with the program.
2 replies on “Expression Web – What? A Bug Already?”
Hi, Morten.
Thanks for trying out Expression Web! Your assessment of Expression Web is very good – it’s not a perfect product, but it’s a good start. While I haven’t seen that behaviour before with PHP files, I will pass on your feedback to the Expression Web product team.
I know that there is an intent for full PHP support in the next major version of Expression Web, but that is a TBD right now. It wouldn’t surprise me if the support for PHP does in fact make it into v2.0, however, and I’m hoping that the product team has already caught this bug for the next release. If they haven’t, they will be notified of it by me. 🙂
Thanks for coming to our event! I’m glad it was useful and enjoyable for you!
Best regards,
Paul
What you are probably seeing or rather not seeing is probably the BOM or Byle Order Mark characters that notify the browser that the page uses UTF-8 encoding. Expression Web add it by default unless you have a meta element setting the characterset to something other than UTF-8 (which is the default for WordPress). Unfortuantely, there is no other way to turn off the BOM that is 100% sucessful. The product team is well aware of the BOM issue and the problems it causes in PHP.
Simply uploading the file should not cause a BOM to appear but I am guessing you used Expression Web to edit your config.php file. There are a few things you can do to make working wtih PHP files in the current version some of which I have summarized at http://by-expression.com/tutorials/characterset/index.aspx