CakePhp Installation and configuration

17 Dec

Installation of cake is very simple.

Download cake from cakephp.org and place it into your root directory. After placing it in the root directory. Simply write in your browser

http://localhost/cake/

you will be served with the default page, saying that “change config/database.php.default to config/database.php”. To do this open root_dir/cake/app/config/ and rename database.php.default to database.php.

keep in mind that the database.php.default is in the “app/” directory.

Now if you refresh the page you will see a message “Your database configuration file is present”. However you will see some warnings. To remove these warning you will need to make changes to your app/config/database.php file.

Open the file and make following changes.

var $default = array(

‘driver’ => ‘mysql’,

‘persistent’ => false,

‘host’ => ‘localhost’,

‘login’ => ‘root’,

‘password’ => ”,

‘database’ => ‘database_name’,

‘prefix’ => ”,

);

All the above information should match to your mysql configuration information, especially host, login, password, and database name.

Now after making these changes and saving the file. Refresh your url. You will see a message

“Cake is able to connect to the database”.

That’s it you have now installed and configured your cakephp successfully.

One Response to “CakePhp Installation and configuration”

  1. Ahsan Shahzad December 19, 2008 at 6:51 am #

    cool post🙂 ,
    Are you also working on CakePhp ? If so, please keep on to post further on Cakephp. As it will be helpfull for people like me who are not Cake adict but love to learn about it.

    Thanks again!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: