Showing posts with label XAMPP With CakePHP. Show all posts
Showing posts with label XAMPP With CakePHP. Show all posts

Thursday, March 9, 2017

How to Install CakePHP in XAMPP

CakePHP is a free, open-source, rapid development framework for PHP. CakePHP is most popular PHP frameworks today.

The very first thing is to need download CakePHP from here
Then extract it in xampp/htdocs folder as below screenshot:


Next is to browse application: http://localhost/cake/ which will look like below screenshot:


Now open "C:\xampp\htdocs\cake\app\Config\core.php" and change value of following properties "Security.salt" and "Security.cipherSeed".

It will remove first 2 errors.

Then its time to connect the application to MySQL database. To do so first rename the file "C:\xampp\htdocs\cake\app\Config\database.default.php" to "C:\xampp\htdocs\cake\app\Config\database.php" and edit the file as follows:

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


And finally:

To change the content of home page, edit: APP/View/Pages/home.ctp.
To change layout, edit: APP/View/Layouts/default.ctp.
You can also add some CSS styles for your pages at: APP/webroot/css.