Softpedia
 

NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
Home > News > Webmaster > Tips and Tricks

September 13th, 2007, 15:16 GMT · By Adrian Placinta

Installation and Database Configuration of CakePHP

SHARE:

Adjust text size:



Enlarge picture
Now that you know what CakePHP is and what you can do with it, I will help you to install it so you may start building your first application. Before starting downloading the installation kit, verify if you comply with the requirements: a webserver (Apache, IIS, etc), PHP (4.3.2 or greater) and a database server (MySQL, PostgreSQL and a wrapper for ADODB). If you comply with the requirements, download the installation kit and let's start installing it. The webserver must have sessions and mod_rewrite enabled. If you want to text the latest
features of CakePHP download the alpha version, but if you only need the stable version, download it from here.

Extract the files from the arhive and copy the files in htdocs (for Apache users) or wwwroot(for IIS users). Here the htdocs/wwwroot folder acts like your web root (you must use mod_rewrite). Another way to install CakePHP is to change DocumentRoot from your server, so all of your domain will act as a simple CakePHP application. Change DocumentRot to look like this: DocumentRoot /path_to_cake/app/webroot.

Next, we will configure CakePHP. First, let`s configure the database. You will find the database configuration file in app/config/ and is named database.php. Change from

var $default = array(

'driver' => 'mysql',

'connect' => 'mysql_connect',

'host' => 'localhost',

'login' => 'user',

'password' => 'password',

'database' => 'project_name',

'prefix' => '');

with the data from your database server: driver (what server you use: mysql, postgresql,sqlite), host (your server ip or name), login (user name of the database server), password (the password for the server), database (database name), prefix (if you want to change to "cakephp_" ) and connect (allows you to specify whether or not the database connection will be treated as persistent or not).

In the next article we`ll learn how to configure global variables in CakePHP
FILED UNDER:
MySQL
PostgreSQL
CakePHP

TELL US WHAT YOU THINK:

7,865 hits · Link to this article · Print article · Send to friend · Subscribe to news

MUST-READ RELATED ARTICLES:


CakePHP - PHP development framework

READER COMMENTS:



No user comments yet.
Be the first to express your opinion!
Copyright © 2001-2012 Softpedia. Contact/Tip us at

WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM