Zend 框架:未定义的类常量“MYSQL_ATTR_INIT_COMMAND" [英] Zend Framework: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'

查看:17
本文介绍了Zend 框架:未定义的类常量“MYSQL_ATTR_INIT_COMMAND"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可能已经知道,我从之前的问题中从 ubuntu 切换到了 Windows.我在 ubuntu 上开发 Zend Framework,现在在 Windows 上开发同一个项目.由于这种切换,我在 windows 中遇到了一些在 ubuntu 中没有发生的问题.

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.

现在,当我进入登录页面时,firebug 控制台中出现以下错误:

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?

我有以下数据库配置.

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"

谢谢

推荐答案

这看起来与 PHP 的 bugtracker 上的这个错误有关:Bug #47224 MYSQL_ATTR_INIT_COMMAND 不再可用

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

它似乎已在 SVN 中修复——但可能不是在您使用的 PHP 版本中?

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] 毫克 at artigodot pl
一个临时的解决办法是使用 INT 值 (1002) 而不是常数.

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

这可能是一个临时解决方案,直到您安装新版本的 PHP 并修复了其中的错误?

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

这篇关于Zend 框架:未定义的类常量“MYSQL_ATTR_INIT_COMMAND"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆