0

I want my cakephp support Unicode, I have tried to change my database config (cakephp-2.3.2/app/Config/database.php)

public $default = array(
    'datasource' => 'Database/Mysql',
    'persistent' => false,
    'host' => 'localhost',
    'login' => 'root',
    'password' => '***************',
    'database' => 'db_1stcakephp',
    'prefix' => '',                
    'encoding' => 'utf8' // I applied this statement to make cake php support unicode;
);

After that I refreshed my site and what I got is an error occurred:

Error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' File: C:\wamp\www\cakephp-2.3.2\lib\Cake\Model\Datasource\Database\Mysql.php
Line: 146

thaJeztah
  • 27,738
  • 9
  • 73
  • 92
Mab KaaKoo
  • 125
  • 1
  • 6
  • 19

1 Answers1

0

This is due to a PHP 5.3.0 bug on Windows where MYSQL_ATTR_INIT_COMMAND is not available. The PHP bug report is:

http://bugs.php.net/bug.php?id=47224

If you are experiencing this, please update your WAMP product to a version that uses PHP 5.3.1 or later version.

Siraj Khan
  • 2,328
  • 17
  • 18