0
我遇到類似於The PDO extension is required for this adapter but the extension is not loaded的問題,但不一樣。PDO在Magento中正常加載,但在外部CMS中沒有加載
Magento的安裝運行正常,但當我嘗試運行:
require_once(APATH.MAGEPATH.'/app/Mage.php');
umask(0);
Mage::app();
在外面的Magento的目錄,我得到的錯誤:
Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'The PDO extension is required for this adapter but the extension is not loaded' in
/home/inzana/public_html/Store/lib/Zend/Db/Adapter/Pdo/Abstract.php:342
Stack trace: #0 /home/inzana/public_html/Store/lib/Zend/Db/Adapter/Abstract.php(247): Zend_Db_Adapter_Pdo_Abstract->setFetchMode(2)
#1 /home/inzana/public_html/Store/app/code/core/Mage/Core/Model/Resource.php(165): Zend_Db_Adapter_Abstract->__construct(Array)
#2 /home/inzana/public_html/Store/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#3 /home/inzana/public_html/Store/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#4 /home/inzana/public_html/Store/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#5 /home/inzana/public_html/Store/app/code/core/Mage/Core/Model/R in /home/inzana/public_html/Store/lib/Zend/Db/Adapter/Pdo/Abstract.php on line 342
的phpinfo()報道:
'./configure' '--disable-fileinfo' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring'
'--enable-pdo=shared' '--enable-sockets' '--prefix=/usr' '--with-curl=/opt/curlssl/' '--with-gd' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre'
'--with-pdo-mysql=shared'
'--with-pdo-sqlite=shared' '--with-png-dir=/usr' '--with-sqlite=shared' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'
本地php.ini文件包括:
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so
我失去了下一步要去的地方。任何幫助讚賞。
http://magento.stackexchange.com/ – mkaatman 2013-03-12 18:20:12
@mkaatman這不是Magento的特定問題。這是關於Stack Overflow的話題 - 實際上甚至比Magento更重要。S – 2013-03-12 18:28:59
你打算如何調用第二個腳本? – 2013-03-12 18:29:35