CakePHP on Dreamhost Linux

Really not that difficult, but there are a couple of trip-up spots.

Let me say this first, GoDaddy is a miserable experience. I will back off a little and say perhaps it's just been a very long time since I've dealt with a shared host, but that doesn't change the fact that their web interface times out, is slow, and cluttered.

That all aside I needed to get a CakePHP based app up and running on an account there. There are some google results that pointed the way.

First of all if you have a relatively new GoDaddy account hosted on Linux you'll be able to use .htaccess files. Windows hosts seem to be out of luck. Of course the rewrite rules in .htaccess files are needed by CakePHP to function properly.

Before uploading your app edit app/webroot/.htaccess and change :

RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

to

RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]

Just an additional slash. GoDaddy has some of its own rewrites that seem to enjoy getting in the way.

Now the fun part that caught me off guard and doesn't seem to get any mention in GoDaddy's Help Documentation, wait 15 minutes and check your site. So I would deploy your app to a subdomain first then move it to production to make sure everything is actually working properly.

And that's about it. Seems to be all you need to do for a 1.1 and 1.2 Cake apps.

February 14th, 2008

Leave a Reply

design by gorotron ported by railsgrunt powered by mephisto