Posts tagged ‘programming’

Using CakePHP with Godaddy

I was able to setup CakePHP on godaddy, the most frustrating part I dealt with was the wild goose chase I was sent on by Google trying to figure it out.

  1. Add Options +FollowSymlinks to three .htaccess files
  2. Add RewriteBase /path/to/app to the /.htaccess file

I first set my site up to work on a sub-directory for practice as the site was already live. When I did this, I set RewriteBase /test (where my directory was test).

Here are the three .htaccess files:

  • base_directory/.htaccess (this was /test while I was setting it up, and / after I moved it later)
    <IfModule mod_rewrite.c>
    	 Options +FollowSymlinks
       RewriteEngine on
    	 RewriteBase /
       RewriteRule    ^$ app/webroot/    [L]
       RewriteRule    (.*) app/webroot/$1 [L]
    </IfModule>
    
  • webapp/.htaccess
    <IfModule mod_rewrite.c>
        Options +FollowSymLinks
        RewriteEngine on
        RewriteRule    ^$    webroot/    [L]
        RewriteRule    (.*) webroot/$1/    [L]
     </IfModule>
    
  • /app/webroot/.htaccess
    <IfModule mod_rewrite.c>
        Options +FollowSymLinks
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
    </IfModule>
    
  • For what it’s worth, I would just complete the first step and see if this suffices (the .htaccess in the application root). I had already changed the latter two files, and didn’t feel like going back and editing them, just in case it might have caused a new headache

After these few changes, it was a breeze really. I just wish I hadn’t been sent on the proverbial wild goose chase for this 2 lines of code that got this app working.

Drizzle Database

If you are interested in open source database options and prefer to stay away from those huge giants, then Drizzle might be the option for you. I moved to postgres for my current apps (from MySQL), but for those of you that may not have that option or really enjoyed the features on mysql, Drizzle might be the right option for you. Drizzle Project Home

I’ll definitely be giving this a shot in the coming months as I go to launch my next project that requires a relational database.

© 2012 - Jeff Ancel
Wordpress Themes
Scroll to Top