CakePHP is an open source web application framework written in PHP, modeled after the concepts of Ruby on Rails, and distributed under the MIT License.
Here the configuration
First install xampp which consists of Apache, PHP, and MySQL. The install process just copies some files to a specified folder.
Next
Get latest cake php
Let’s take a look at what CakePHP looks like right out of the box. You know what CakePHP looks like from a basic MVC request standpoint, but you’ll need to know how its files are organized as well.
- app
- cake
- docs
- index.php
- vendors
When you download CakePHP, you will see four main folders. The app folder will be where you work your magic: it’s where your application’s files will be placed. The cake folder is where we’ve worked our magic. Make a personal commitment not to edit files in this folder. We can’t help you if you’ve modified the core. The docs folder is for the quintessential readme, changelog, and licensing information. Finally, the vendors folder is where you’ll place third-party PHP libraries you need to use with your CakePHP applications
CakePHP’s app folder is where you will do most of your application development. Let’s look a little closer and the folders inside of app.
- config
- Holds the (few) configuration files CakePHP uses. Database connection details, bootstrapping, core configuration files and more should be stored here.
- controllers
- Contains your application’s controllers and their components.
- locale
- Stores string files for internationalization.
- models
- Contains your application’s models, behaviors, and datasources.
- plugins
- Contains plugin packages.
- tmp
- This is where CakePHP stores temporary data. The actual data it stores depends on how you have CakePHP configured, but this folder is usually used to store model descriptions, logs, and sometimes session information.
- vendors
- Any third-party classes or libraries should be placed here. Doing so makes them easy to access using the vendor() function. Keen observers will note that this seems redundant, as there is also a vendors folder at the top level of our directory structure. We’ll get into the differences between the two when we discuss managing multiple applications and more complex system setups.
- views
- Presentational files are placed here: elements, error pages, helpers, layouts, and view files.
- webroot
- In a production setup, this folder should serve as the document root for your application. Folders here also serve as holding places for CSS stylesheets, images, and JavaScript files.
- Steps
- After that open “httpd.conf” located on “apache\conf” folder. Then uncomment the line that contains “mod_rewrite”
- Afterwards, extract Cake somewhere in the “htdocs” folder. I usually put it in “htdocs\cake”.
- The last step is to copy “database.php.default” in “app\config” of Cake’s folder to “database.php”. Then change the “$default” variable to suit your database settings
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
Nice one
Thanks for the post!
hi. thanks for the tip.
it’s great ..
hi, i have some problems with PHP5.2…
this is the log:
Strict Standards: Redefining already defined constructor for class
Object in /opt/lampp/htdocs/miprimerpastel/cake/libs/object.php on
line 63
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/inflector.php
on line 131
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/configure.php
on line 136
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/configure.php
on line 226
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/configure.php
on line 906
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/configure.php
on line 946
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/cache.php on
line 71
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/cache.php on
line 151
Strict Standards: Non-static method Configure::getInstance() should
not be called statically in /opt/lampp/htdocs/miprimerpastel/cake/
bootstrap.php on line 43
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/debugger.php
on line 99
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/debugger.php
on line 108
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/file.php on
line 96
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/cache/
file.php on line 89
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/dispatcher.php on
line 453
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/dispatcher.php on
line 677
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/router.php on
line 173
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/controller/
controller.php on line 338
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/controller/
controller.php on line 779
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/controller/
component.php on line 237
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/controller/
component.php on line 239
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/view/view.php
on line 748
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/
class_registry.php on line 68
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/
class_registry.php on line 140
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/
class_registry.php on line 148
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/security.php
on line 53
CakePHP: the rapid development php framework
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/i18n.php on
line 109
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/i18n.php on
line 110
Deprecated: Function split() is deprecated in /opt/lampp/htdocs/
miprimerpastel/cake/libs/l10n.php on line 396
Release Notes for CakePHP 1.2.4.8284.
Read the changelog
Your tmp directory is writable.
The FileEngine is being used for caching. To change the config edit
APP/config/core.php
Your database configuration file is present.
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/model/
connection_manager.php on line 66
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/model/
connection_manager.php on line 80
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/htdocs/miprimerpastel/cake/libs/model/
connection_manager.php on line 106
Cake is able to connect to the database.
Anyone know how to fix it?
Cya!
Hi again, i solved the problem… anyway thx