2012年3月31日 星期六

[ 你說我打 ] [ 技術文件 ] Cake php 2.1 + window 7 install note


(***此篇內容已經過原作者同意發佈。)
  • Introduction

Cake php will support php version more than 5.2.8
If you install appserv 2.5.10, your php version only 5.2.6, so you framework will be die.
And cake php 2.1 support mysql version is 4 or 5.(in config/database.php).
So, you install appserv 2.6.0, your framework will be die too.
Finally, I install WAMP package 2.2 x64.
It’s support apache 2.2.21, php 5.3.10, mysql 5.5.2, xdbug 2.1.2, xdc 1.5, phpmyadmin 3.4.10.1, sql 
buddy 1.3.3 webgrind 1.0.
It’s compare support cake php 2.1, but you need do something setting.


--------------------------------------------------------------------------------------------------------
  • Apache
Setting in httpd.conf properties.

1.  #LoadModule rewrite_module modules/mod_rewrite.so

    Change to

        LoadModule rewrite_module modules/mod_rewrite.so

2.       
<Directory />
         Options FollowSymLinks
         AllowOverride None
         Order deny,allow
         Deny from all
</Directory>

Change to

 <Directory />
          Options FollowSymLinks
          AllowOverride None
    #    Order deny,allow
    #    Deny from all
 </Directory>

--------------------------------------------------------------------------------------------------------

  • Mysql & phpmyadmin
1.  open your phpmyadmin in your browers.

2.  Click “Privileges”

3.  Remove all user except “root”

4.  Edit Privileges your root password (like:1234)

5.  Check your setting is success.

6.  Open your config.ini.php in “C:\wamp\apps\phpmyadmin3.4.10.1\ config.ini.php”

7.      
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] =’’;
$cfg['Servers'][$i]['AllowNoPassword'] = true;

Change to like (password you should input yourself)

$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '1234';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

8.   Reatsrt all service (apache, php, mysql)

--------------------------------------------------------------------------------------------------------
  • Cake php 2.1
1.   in “wamp/www/cakephp2.1” (it’s your root)

2.  check .htaccess is sopy success.
(/cakephp2.1/.htaccess)
(/cakephp2.1/app/.htaccess)
(/cakephp2.1/webroot/.htaccess)

3.  rename “app/Config/database.php.defaulf” to “app/Config/database.php”

4.  edit database.php (your setting)
         public $default = array(
                 'datasource' => 'Database/Mysql',
                 'persistent' => false,
                 'host' => 'localhost',
                 'login' => 'root',
                 'password' => '1234',
                 'database' => 'ifibiop',
                 'prefix' => '',
                 //'encoding' => 'utf8',
         );

5.  edit core.php
  //Configure::write('Security.salt','DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');

  Change to

    Configure::write('Security.salt', '');


  //Configure::write('Security.cipherSeed', '76859309657453542496749683645');
  
  Change to

    Configure::write('Security.cipherSeed', ''); 

--------------------------------------------------------------------------------------------------------

  • Xdebug on/off
1.  open php.ini

2.  find error_reporting = E_ALL

3.  change to error_reporting = E_ALL & ~E_NOTICE

4.  it’s success off

--------------------------------------------------------------------------------------------------------

  • success page




author : shiou

沒有留言:

張貼留言