views:

250

answers:

2

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

+2  A: 

This looks related to this bug on PHP's bugtracker : Bug #47224 MYSQL_ATTR_INIT_COMMAND is no longer available

It seems it's been fixed in SVN -- but maybe not in the version of PHP you are using ?


Quoting one of the comments :

[2009-07-02 06:43 UTC] mg at artigo dot pl
A temporary solution is to use INT value (1002) instead of constant.

This might be a temporary solution, until you install a new version of PHP, in which the bug is fixed ?

Pascal MARTIN
Ok. first I try the latest WAMP.
Awan
+1  A: 

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.

Charles