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.
Posted in CakePhp
