欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

zend 框架下pdo的以下问题

程序员文章站 2022-04-02 15:25:47
...
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
请教一下,这个问题怎么解决。
其他在不需要数据库的情况下可以正常访问。