Cake Notes

Observations from a self-confessed CakePHP newb

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Yesterday I was pretty self-satisfied when I got my CakePHP app all polished and well-behaved on my development machine. I just had a neat little checkbox on my to-do list left to go: “Install app on server”. I figured that the happy standard PHP and MySQL combo would mean an easy deployment with only a couple of config changes.

One of these days I’m going to transform from an optimistic idealist to a full-on cynic.

I got everything uploaded, database migrated, connection settings changed, and went to the index page. Or rather, where the index page should have been. Instead, there was a blank page.

I tested some other pages. Nothing. I went to my error log. Nothing. I messed with some .htaccess files. Nothing. I googled. Nothing. I was beginning to get a little worried because I had no idea what was wrong and had committed to getting this thing visible for testing before the day was out.

And then, finally, I found a conversation in the CakePHP Google Group entitled “Empty page response.” That sounded promising. Sure enough, some other poor souls had encountered the same issue, and several more-experienced bakers had thrown out some potential fixes.

I went through each fix (with the exception of the server changes, since I’m on shared hosting and don’t have access) and was even more concerned when even the fixes that had solved the problem for others failed to give me anything.

I finally got to the last suggestion (deleting a cached file) feeling slightly hopeless. Imagine my surprise (and delight!) when I deleted one little file and everything suddenly started working!

I didn’t have the time or interest to try each of the fixes independently, so it may have been the cumulative effect of several of them, or it may have been just the last one. If this happens again, I’ll apply the fixes in reverse order. :)

sarah   CakePHP 1.2, Deployment, Errors December 2007

Post A Comment