Cake PHP:

Cake PHP is a free open-source rapid development framework for PHP, inspired by Ruby on Rails. It provides an extensible architecture for developing, maintaining, and deploying applications. It uses MVC software design pattern. It supports UNIX and Windows Platform and it is easy to install.

Before running cakephp we must need

* Apache(HTTP) server.

* php 4.3.2 or greater.

* database server(MySQL).

steps to instal cake php:

1. Go to official site http://cakephp.org/ to download the cakephp.zip file.

2. Download the file and unzip the file.

3. Rename the unzipped file and save into localhost root (wamp/www or xampp/htdocs).

Example: xampp/htdocs/cakephp

4. Now open a web browser and type http://localhost/cakephp/

Note: you have to run the web server(Apache) and database server(MySQL).

5. Now you will get some notifications as following.

cake

6. According to the first two notifications we have to change the security salt value and security cipher Seed value.

Open the file cakephp/app/config/core.php and change those two values.

Note: security salt is a random string used in security hashing methods and security cipher Seed is a random numeric string (digits only) used to encrypt/decrypt strings.

7. Now we have to configure the database for database connection.

8. Open localhost/PhpMyadmin and create one database.

Ex:  db_cakephp

9. Rename the database.php.default as database.php in app/config/ folder.

10. Open database.php file and change the DATABASE_CONFIG class.

Actual code:

class DATABASE_CONFIG {

public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'database_name',
'prefix' => '',
//'encoding' => 'utf8',
);
 public $test = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'test_database_name',
'prefix' => '',
//'encoding' => 'utf8',
);
}

 

Change the login, password and database details.

Ex:

class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'db_cakephp',
'prefix' => '',
//'encoding' => 'utf8',
);
public $test = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => 'root',
'database' => 'db_cakephp',
'prefix' => '',
//'encoding' => 'utf8',
);
}

 

11. Now again go through the link: http://localhost/cakephp/

You will get the notifications as follows

cake2

 

12. Now your cakephp is ready to use.