CakePHP Install Checklist (Apache)

Friday, 5 June 2009 02:03 , In

CakePHP is easy to install - extract the latest version into your web-accessible folder and you're good to go. If you don't see the default Cake page, try this checklist to see if you meet the necessary requirements for installing CakePHP on a Linux server.

  • Make sure you have the lastest stable release by going to http://cakeforge.org/projects/cakephp. You can download the nightly release from their SVN repository at https://svn.cakephp.org/repo/trunk/cake/ but take care to note this is not marked as stable for production.
  • Make sure that an .htaccess override is allowed: in your httpd.conf, you should have a section that defines a section for each Directory on your server. Make sure the AllowOverride is set to All for the correct Directory.
  • Make sure the .htaccess files are present - your operating system may treat these as hidden files and ignore them. These are essential.
  • Ensure mod-rewrite is enabled. This allows for "pretty" URLS such as www.mysite.com/posts/latest-bilge rather than /posts.php?post_id=934789. To enable mod-rewrite on Ubuntu Linux use: sudo a2enmod rewrite
  • What directory are you running the install from? If it's from a user directory (and not the webroot) then you need to set a RewriteBase [folder name] in the root .htaccess file.
  • If you are getting infinite redirect loop errors in your browser, this will probably be a rewrite problem. However this could also be caused by ACL permission issues - by default this is off so you should know if you've got ACL enabled for your app.
  • Are your sessions not working? Are you using a custom session handler? How are you saving your sessions? By default, CakePHP will use PHP's default session handler, if for some reason you don't have permissions to write to disk, you may get an error such as "session_start() [function.session-start]: open(/var/php_sessions/
    sess_55725da39073051a9529a124c99b54df, O_RDWR) failed: No such file or
    directory (2) [CORE/cake/libs/session.php, line 539]"
  • In this instance, make sure the /var directory is writable by the apache process.
  • What version of PHP are you running? You will need version 4.3.2 or higher (CakePHP runs equally well on 4 and 5 - though there may be different bugs in each)

Installing CakePHP On IIS

See this article for detailed instructions on how to install Cake on IIS.

Installing CakePHP On Cpanel

See this article for detailed instructions on how to install Cake on Cpanel.

7 comments:

Unknown said...

Hey I'm selling cakephptutorials.com Send me a note if you're interested.

4 January 2010 at 19:46
Unknown said...

sandy.wilkins.cr (atAT) gmail.com just in case.

4 January 2010 at 19:47
Unknown said...

Thanks for another great post. It will surely improve our coding practice. Keep sharing similar stuff.
php programming India

20 October 2010 at 23:39
topclassified said...

The coding parctice can only be improved only by practice and good guidence.


classified php script

8 May 2012 at 04:56
Anonymous said...

Great Cake Tuets...

6 August 2012 at 02:19
Unknown said...

Thanks for this useful post. For more visit: examanswer24.com

17 April 2013 at 22:40
Abid Ali Balospura said...

I am really happy to say it’s an interesting post to read . I learn new information from your blog.

emedstore

1 April 2022 at 07:02

Post a Comment