Heim  >  Artikel  >  Backend-Entwicklung  >  php加载pdo,该如何处理

php加载pdo,该如何处理

WBOY
WBOYOriginal
2016-06-13 13:50:231019Durchsuche

php加载pdo
快点帮帮忙呀,我遇到一个棘手问题,在线等待回答
就是php加载pdo.dll,pdo_pgsql问题,我再xp下运行正常,但是我在2003下配置php运行项目总是提示我
1exception 'Zend_Db_Adapter_Exception' with message 'The PDO extension is required for this adapter but the extension is not loaded' in E:\scispg\library\Zend\Db\Adapter\Pdo\Abstract.php:107 Stack trace: #0 E:\scispg\library\Zend\Db\Adapter\Abstract.php(414): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 E:\scispg\library\Zend\Db\Adapter\Pdo\Abstract.php(220): Zend_Db_Adapter_Abstract->query('select * from u...', Array) #2 E:\scispg\library\Zend\Db\Adapter\Abstract.php(641): Zend_Db_Adapter_Pdo_Abstract->query('select * from u...', Array) #3 E:\scispg\application\modules\default\models\User.php(26): Zend_Db_Adapter_Abstract->fetchAll('select * from u...') #4 E:\scispg\application\modules\default\controllers\IndexController.php(46): Model_User->select('926212', '1111111') #5 E:\scispg\library\Zend\Controller\Action.php(503): IndexController->loginAction() #6 E:\scispg\library\Zend\Controller\Dispatcher\Standard.php(285): Zend_Controller_Action->dispatch('loginAction') #7 E:\scispg\library\Zend\Controller\Front.php(934): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #8 E:\scispg\public\index.php(35): Zend_Controller_Front->dispatch() #9 {main}

我看看phpinfo()里没有pdo模块和pdo_pgsql模块,可是我已经都配置了,在我自己机子上也能运行,完全相同的php.ini文件拷贝过去就是加载不上,对应的.dll我也拷贝到system32里了,还是不行
请帮忙呀

------解决方案--------------------
你装一个集成环境的好了像什么appserv之类的
------解决方案--------------------
需要拷贝php根目录下面的libpq.dll文件至system32
------解决方案--------------------
我前几天才配置成功过一台win2003下IIS集成PHP 5.2.11,而且没有向系统中拷贝任何文件。
1.web服务扩展和站点映射ISAPI中添加php扩展名就不用说了吧;
2.系统环境变量(右键我的电脑-》属性-》高级-》环境变量-》系统变量)中添加变量PHPRC值就是“c:\php”(你的php所在目录);
3.系统环境变量的变量Path的值中添加“c:\php”和“c:\php\ext”。

php.ini还是放在php目录下,你试试看。

你的情况也有可能系统载入的并不是你所修改的哪个php.ini
------解决方案--------------------
还有,修改了配置要记得重启一下web服务再试。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn