NEWS CATEGORIES:



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

Tips and Tricks


Installation and Database Configuration of CakePHP

How to configure CakePHP part1

By Adrian Placinta, Web News Editor

13th of September 2007, 15:16 GMT

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

TAGS:

MySQL | PostgreSQL | CakePHP
Read by 3,761 user(s) | Add comment | Link to this article TWEET THIS


Article rating:
Fair (2.6/5) 8 vote(s)    

Subscribe to news | Print article | Send to friend

© Copyright 2001-2009 Softpedia
Contact:

 

 

SEARCH THE NEWS ARCHIVE :




Today's News
| Yesterday's News | News Archive


MORE RELATED ARTICLES:


CakePHP - PHP development framework

User opinions:

No user comments yet.
Be the first to express your opinion using the form below!

Share your opinion:

Your Name:
Your Email Address:
(will not be used for commercial purposes)
Solve this to prove you're not a bot: =
Your review/opinion:

 




Windows tabGames tabDrivers tabMac tabLinux tabScripts tabMobile tabHandheld tabGadgets tabNews tab

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   ENTER NEWS SITE   |   ENGLISH BOARD   |   ROMANIAN FORUM