How to install CakePHP in XAMPP
Cake is a PHP web development framework which employs the MVC model. I will describe how to set it up on a win32-based machine.
First install xampp which consists of Apache, PHP, and MySQL. The install process just copies some files to a specified folder.
Next, run “setup_xampp.bat” located on the root xampp folder.
After that open “httpd.conf” located on “apacheconf” folder. Then uncomment the line that contains “mod_rewrite”. This is needed to enable Cake’s pretty URL such as “http://localhost/cake/users/view” instead of “http://localhost/cake/index.php/users/view”.
Afterwards, extract Cake somewhere in the “htdocs” folder. I usually put it in “htdocscake”.
The last step is to copy “database.php.default” in “appconfig” of Cake’s folder to “database.php”. Then change the “$default” variable to suit your database settings. An example is:
class DATABASE_CONFIG
{
var $default = array('driver' => 'mysql',
'connect' => 'mysql_connect',
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'test',
'prefix' => '');
}
Which works with the default MySQL in xampp.
To see if things are working properly, run “xampp-control.exe” in xampp’s root folder and then start Apache and MySQL from there:
After that point your browser to “http://localhost/[cake's root folder]” for example “http://localhost/cake”. and enjoy CAKE
Cake is a PHP web development framework which employs the MVC model. I will describe how to set it up on a win32-based machine.
First install xampp which consists of Apache, PHP, and MySQL. The install process just copies some files to a specified folder.
Next, run “setup_xampp.bat” located on the root xampp folder.
After that open “httpd.conf” located on “apacheconf” folder. Then uncomment the line that contains “mod_rewrite”. This is needed to enable Cake’s pretty URL such as “http://localhost/cake/users/view” instead of “http://localhost/cake/index.php/users/view”.
Afterwards, extract Cake somewhere in the “htdocs” folder. I usually put it in “htdocscake”.
The last step is to copy “database.php.default” in “appconfig” of Cake’s folder to “database.php”. Then change the “$default” variable to suit your database settings. An example is:
class DATABASE_CONFIG
{
var $default = array('driver' => 'mysql',
'connect' => 'mysql_connect',
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'test',
'prefix' => '');
}
Which works with the default MySQL in xampp.
To see if things are working properly, run “xampp-control.exe” in xampp’s root folder and then start Apache and MySQL from there:
After that point your browser to “http://localhost/[cake's root folder]” for example “http://localhost/cake”. and enjoy CAKE