CakePHP Install Checklist (Apache)
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)
7 comments:
Hey I'm selling cakephptutorials.com Send me a note if you're interested.
sandy.wilkins.cr (atAT) gmail.com just in case.
Thanks for another great post. It will surely improve our coding practice. Keep sharing similar stuff.
php programming India
The coding parctice can only be improved only by practice and good guidence.
classified php script
Great Cake Tuets...
Thanks for this useful post. For more visit: examanswer24.com
I am really happy to say it’s an interesting post to read . I learn new information from your blog.
emedstore
Post a Comment