Today this post is for cakephp beginner for those people who wants to switch from corephp to any framework, Moving from corephp to framework is good idea because when you will start working on framework your development will be fast because frame works pre-defined plugins and libraries. which we used to create in corephp.
There is lot’s of framework available on web you can choose any of them according to your need. each frame work has unique feature.
So Lets start our cakephp installation and configuration.
Step:1- Download latest version of cakephp 2 from http://cakephp.org
Note: This tutorial is about cakephp V2
Make sure that read and write permission is on for app/tmp folder if not then allow.
below command in linux to give full permission.
sudo chmod -R 777 cakephp/app/tmp
Change the value of Security.salt & Security.cipherSeed in /config/core.php file.
Configure::write('Security.salt', 'ROHITDYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi'); Configure::write('Security.cipherSeed', '955576859309657453542496749683645');
Now your first two notice will be fixed.
Time to configure your database, first rename the file from database.php.default to database.php which you can find in app/config/ folder.
Now your database file is available for connect with database.
Create a database in your mysql using phpmyadmin or any other software which you are using to access to mysql.
After that place your database details in database.php file
public $default = array( 'datasource' => 'Database/Mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'user', 'password' => 'password', 'database' => 'database_name', 'prefix' => '', //'encoding' => 'utf8', );
Step-6: This is final configuration step to configure cakephp debug kit for your project. Download Cakephp Debug Kit from github https://github.com/cakephp/debug_kit
extract and place it under app/Plugin/ folder and rename it from debug_kit-master to DebugKit
it look like app/Plugin/DebugKit
and open file app/Config/bootstrap.php and paste below code.
This step is not essential but will help you to debug your cakephp code if you do.
Hope this cakephp beginner tutorial will help you to configure cakephp in your system. 🙂