As you may have known that I switched from ubuntu to windows from my previous questions. I was working on Zend Framework on ubuntu and now working on same project in windows. Because of this switching I am facing some problems in windows which was not occurred in ubuntu.
Now I have the following error in firebug console when I go to login page:
<b>Fatal error</b>: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' in <b>C:\wamp\www\vcred\library\Zend\Db\Adapter\Pdo\Mysql.php</b> on line <b>93</b><br />
Do you people know that what type of error is this and what is the solution?
I have the following configuration for database.
resources.db.adapter = "Pdo_Mysql"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = ""
resources.db.params.dbname = "test"
resources.db.params.charset = "utf8"
Thanks
I got the same error, on debian6, when I had not yet installed
php-mysql
so, I simply installed this, like thisI just add it here, in case other have same problem, to save them them a few minutes of research.
Looks like a Windows bug in PHP 5.3 that was fixed in SVN a while ago. You might want to try updating to the latest PHP release to see if the issue still exists.
I just had the same error with PHP 5.2.6, and all I had to do is to open
php.ini
(e.g. on Windows: C:\Windows\php.ini, or on Ubuntu: /etc/php5/apache2/php.ini or sg. like this) in a text editor, and remove the semicolon from the following line:So as a result it would look like this in php.ini:
That solved my problem.
This looks related to this bug on PHP's bugtracker : Bug #47224
MYSQL_ATTR_INIT_COMMAND
is no longer availableIt seems it's been fixed in SVN -- but maybe not in the version of PHP you are using ?
Quoting one of the comments :
This might be a temporary solution, until you install a new version of PHP, in which the bug is fixed ?