首頁 >後端開發 >php教程 >zend 框架下pdo的以下问题

zend 框架下pdo的以下问题

WBOY
WBOY原創
2016-06-06 20:29:391414瀏覽

Warning: include_once(Zend/Db/Adapter/Pdo/Mysql.php): failed to open stream: No such file or directory in /usr/share/php/Zend/Loader.php on line 134

Warning: include_once(): Failed opening 'Zend/Db/Adapter/Pdo/Mysql.php' for inclusion (include_path='/var/www/kehuanedu/application/../library:/var/www/kehuanedu/library:.:/usr/share/pear:/usr/share/php') in /usr/share/php/Zend/Loader.php on line 134

Warning: include_once(Zend/Db/Adapter/Pdo/Mysql.php): failed to open stream: No such file or directory in /usr/share/php/Zend/Loader.php on line 134

Warning: include_once(): Failed opening 'Zend/Db/Adapter/Pdo/Mysql.php' for inclusion (include_path='/var/www/kehuanedu/application/../library:/var/www/kehuanedu/library:.:/usr/share/pear:/usr/share/php') in /usr/share/php/Zend/Loader.php on line 134

Fatal error: Uncaught exception 'Zend_Exception' with message 'File "Zend/Db/Adapter/Pdo/Mysql.php" does not exist or class "Zend_Db_Adapter_Pdo_Mysql" was not found in the file' in /usr/share/php/Zend/Loader.php:87 Stack trace: #0 /usr/share/php/Zend/Db.php(263): Zend_Loader::loadClass('Zend_Db_Adapter...') #1 /usr/share/php/Zend/Application/Resource/Db.php(142): Zend_Db::factory('PDO_MYSQL', Array) #2 /usr/share/php/Zend/Application/Resource/Db.php(160): Zend_Application_Resource_Db->getDbAdapter() #3 /usr/share/php/Zend/Application/Bootstrap/BootstrapAbstract.php(695): Zend_Application_Resource_Db->init() #4 /usr/share/php/Zend/Application/Bootstrap/BootstrapAbstract.php(638): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('db') #5 /usr/share/php/Zend/Application/Bootstrap/BootstrapAbstract.php(598): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL) #6 /usr/share/php/Zend/Application.php(373): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL) #7 /var/www/kehuanedu/public/index.p in /usr/share/php/Zend/Loader.php on line 87
以上是报错的信息。
我的配置信息:
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1

resources.db.adapter = "PDO_MYSQL"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = "root"
resources.db.params.dbname = "Kehuanedu_db"
resources.db.params.charset = "utf8"
resources.db.isDefaultTableAdapter = TRUE
resources.db.params.driver_options.1002 = "SET NAMES UTF8;"
根据一本《诗意的边缘》里面一步一步来弄的。

环境:
linux
php 5.6
mysql
请教一下,这个问题怎么解决。
其他在不需要数据库的情况下可以正常访问。

回复内容:

Warning: include_once(Zend/Db/Adapter/Pdo/Mysql.php): failed to open stream: No such file or directory in /usr/share/php/Zend/Loader.php on line 134

Warning: include_once(): Failed opening 'Zend/Db/Adapter/Pdo/Mysql.php' for inclusion (include_path='/var/www/kehuanedu/application/../library:/var/www/kehuanedu/library:.:/usr/share/pear:/usr/share/php') in /usr/share/php/Zend/Loader.php on line 134

Warning: include_once(Zend/Db/Adapter/Pdo/Mysql.php): failed to open stream: No such file or directory in /usr/share/php/Zend/Loader.php on line 134

Warning: include_once(): Failed opening 'Zend/Db/Adapter/Pdo/Mysql.php' for inclusion (include_path='/var/www/kehuanedu/application/../library:/var/www/kehuanedu/library:.:/usr/share/pear:/usr/share/php') in /usr/share/php/Zend/Loader.php on line 134

Fatal error: Uncaught exception 'Zend_Exception' with message 'File "Zend/Db/Adapter/Pdo/Mysql.php" does not exist or class "Zend_Db_Adapter_Pdo_Mysql" was not found in the file' in /usr/share/php/Zend/Loader.php:87 Stack trace: #0 /usr/share/php/Zend/Db.php(263): Zend_Loader::loadClass('Zend_Db_Adapter...') #1 /usr/share/php/Zend/Application/Resource/Db.php(142): Zend_Db::factory('PDO_MYSQL', Array) #2 /usr/share/php/Zend/Application/Resource/Db.php(160): Zend_Application_Resource_Db->getDbAdapter() #3 /usr/share/php/Zend/Application/Bootstrap/BootstrapAbstract.php(695): Zend_Application_Resource_Db->init() #4 /usr/share/php/Zend/Application/Bootstrap/BootstrapAbstract.php(638): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('db') #5 /usr/share/php/Zend/Application/Bootstrap/BootstrapAbstract.php(598): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL) #6 /usr/share/php/Zend/Application.php(373): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL) #7 /var/www/kehuanedu/public/index.p in /usr/share/php/Zend/Loader.php on line 87
以上是报错的信息。
我的配置信息:
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1

resources.db.adapter = "PDO_MYSQL"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = "root"
resources.db.params.dbname = "Kehuanedu_db"
resources.db.params.charset = "utf8"
resources.db.isDefaultTableAdapter = TRUE
resources.db.params.driver_options.1002 = "SET NAMES UTF8;"
根据一本《诗意的边缘》里面一步一步来弄的。

环境:
linux
php 5.6
mysql
请教一下,这个问题怎么解决。
其他在不需要数据库的情况下可以正常访问。

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn