CakePHP environment Configuration

Source: Internet
Author: User
Tags mysql host

1. Install the following software:

  • Apache (apache_2.2.3-win32-x86-no_ssl.msi)
  • PHP (php-5.2.0-win32-installer.msi)
  • Mysql(mysql-5.0.27-win32.exe)

2、cakephp(cake_1.1.12.4205.zip) Installation

  • Decompress cake_1.1.12.4205.zip and copy the contents in the directory to the cake directory of Apache htdocs.

3. Apache configuration (httpd. conf)

  • PHP module loading:
Phpinidir "F:/Workshop/PHP /"
Loadmodule php5_module "F:/Workshop/PHP/php5apache2_2.dll"
Addtype application/X-httpd-PHP. php
  • All <directory> sections

AllowOverride all

  • Load rewrite Module

Loadmodule rewrite_module modules/mod_rewrite.so

  • Append the default startup PHP File

Directoryindex index.html index. php

4. PHP configuration (PHP. INI)

  • Use MYSQL:

Extension = php_mysql.dll

  • Use session:

Session. save_path = "F:/Workshop/tmp/PHP/session"

5. CakePHP database connection Configuration

  • Copy database. php. default in the cake/APP/config directory to database. php.
  • Modify the following content of database. php:

VaR $ default = array ('driver '=> 'mysql ',
'Connect '=> 'mysql _ connect', // Connect Method
'Host' => 'localhost', // MySQL host
'Login' => 'cakeblog', // dB login Username
'Password' => '123', // dB Login Password
'Database' => 'test', // dB name
'Prefix' => ''); // table name prefix

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.