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.
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.