Last night I converted Airbag from SHTML to PHP. While the transition and page renaming was simple enough, getting it to work took no less than four people: myself, Resonance, Waferbaby, and Atlantian.
After converting all the Moveabletype templates and hand coded pages like About or Contact, I rebuilt the entire website. The process went very quickly but resulted in every page coming up completely blank, not a drop of code could be seen when choosing View Source from a browser. Server logs were requested, Bush was blamed, and I was starting to think that blank isn't so bad blank is just the new white.
Still the troupe was determined to find the solution as the symptom had never been seen, let alone diagnosed before. Time passed, Waferbaby told a joke while Atlantian disappeared seemingly never to be heard from again.
Then with a spark triumphant the problem was found. Horns sounded and the heavens opened.
This site is constructed with the finest tool ever created for building websites. When I start building a new page BBEdit spits out a fresh new sheet with the proper DOCTYPE all ready to go. Along with the DOCTYPE is this line at the very top: <?xml version="1.0">.
The use of '<? ?>' indicates to PHP that something must be processed between the question marks. So when the middleware tried to process "version='1.0'" nothing came of it, resulting in blank pages as white and pure as virgin snow.
It might seem obvious now but late last night it was a mystery of the likes you have never seen.
Thank you again to the chaps (see above) who spent 20 minutes in a dark and smokey iChat window trying to help figure this out.
Ladies and gentlemen, Airbag's regular service between cynicism and hyperbole will resume shortly.





Join the fray by reading through and commenting at the end.
Yeah I use PHP on my site as well and remember when I tried adding the XML version tag, my site went down with the same issue...no code showing up. Heh I figured it out after a bit of testing, but yeah that's a pretty annoying issue.
But yeah, you're definitely better off using PHP. It has a lot more flexibility.
I had, sort of, the same problem after updating PHP on my PowerBook. Nothing would show, not even php-errors. Turns out,all I needed to do was enable 'display_errors' in my php.ini file.
At once all the errors of my code sprang to life. A humbling experience indeed.
So why the switch, Greg? What's the back story, Storey?
I know how tricky such things can get. Good job.
Yes, why the switch? According to Netcraft, you switched from Apache on FreeBSD to IIS on Windows. You may also want to try a programming language called ColdFusion.
Actually if you want to be compliant you can add the entry like this:
<?php echo "<?xml version=\"1.0\.">"; ?>
or better yet, shouldn't this be a better tag?
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>
Try turning off short_open_tag in the php.ini file (or slap it into your code with set_ini() ). It's more standards-compliant anyway, and means that only >?php will be parsed by php, not >? alone.
Had the very same thing happen a while ago. Luckily I was building a test page, so there were few items to troubleshoot.
Atlantian and Matt both have very good solutions, both of which I have used on XHTML/PHP sites for a while now. If you convert the header of you page into one nifty include, you then only have to enter the echo statement once, and forget about it until something changes. Though turning off short tags is a mark of rigor in PHP purity, be careful. I know one thing I used to like to do in shorthand was:
<input type="text" value="<?=$value?>">
Which would obviously have to be changed all over the place (along with a million other amateurish things I had done).
--Ben
I switched so I could start tinkering with MySQL and PHP. And while yes, this website is being hosted on the most horrible of web server software, I am assured by my good friend and trouble maker Atlantian that someday soon Airbag will move back to FreeBSD later this year.
That is, if Atlantian can figure out how to run FreeBSD all by his little self.
Have you ever seen the "Thunderbolt" in Mario Cart Double Dash? Thou shalt not take the name of the Hostmaster in vain!
btw: i'm seeing include errors at the bottom of this page. :p
Ah, I forgot to adjust the path on the archive pages. Thanks Daniel.