My Blog

I'll share what I think & have learned with you

Cake PHP 2.2.1 Installation Errors

By Pavan Katepalli
Cakephp

Image taken from http://b2digitaltechnologies.com

Here's a short post on how to fix some common installation problems with Cake PHP 2.2.1. I hope it helps people out there, because I had some issues installing it and spent hours figuring out what was wrong.

Error: URL rewriting is not properly configured on your server

Then go into apache and turn this on in apache modules: rewrite_module.

For me in wamp, I just clicked on the wamp button in the windows tray and went to apache -> apache modules -> rewrite_module.

Then I restarted wamp. I had to do this 3 times before it worked. I have no idea why. Maybe lag?

Error: CakePHP: Can't access MySQL database

Then go into the php.ini (for me I clicked on the wamp button in the windows tray -> PHP -> php.ini) and turn this on: extension=php_pdo_mysql.dll, by getting rid of the semicolon in the front of it. Then restart wamp.

Check your database.php file to see if everything is spelled correctly, and make sure that the user ('login' => 'root',) you're using has permission to edit the database ( 'database' => 'cake',) you're connecting to.

You've got routing problems

You've made sure that the rewrite_module is on and you're still having this problem.

Click on the wamp button and go to Apache and then to the httpd.conf file. Then search for <Directory />.

Then make sure that it looks like this in the <Directory /> tags:

<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Satisfy all
</Directory>

Tags

Keywords For Search Engines

4 comments

Bethel Goka

Had lost some dev time but your solution worked like a charm. Keep up the good work

Pavan (website)

I’m glad I was able to help Bethel :) .

Sayanaël

Thanks for this solution ! After hours browsing internet, your solution work just fine ! P.S: You don’t have to restart wamp, just refresh it.

Pavan (website)

Hey Sayanaël I’m glad the post helped you out! I switched from windows to mac and then mac to ubuntu, so I forget how to refresh wamp. Do you pull up the wamp menu and click on refresh?

Subscribe to New Posts

Recent Comments

  • Hey Sayanaël I’m glad the post helped you out! I switched from windows to mac and then mac to ubuntu, so I forget how to refresh wamp. Do you pull up the wamp menu and click on refresh?

    Pavan in Cake PHP 2.2.1 Installation Errors
  • Thanks for this solution ! After hours browsing internet, your solution work just fine ! P.S: You don’t have to restart wamp, just refresh it.

    Sayanaël in Cake PHP 2.2.1 Installation Errors
  • Great article Pavan! Hopefully I can use a lot of these tips to further my own coding experience.

    Joe in How I Learned to Code For My Start Up

Want to get started?

You've got an idea and I'll code it fast and make it look great.