安装Magento后,在导入数据库时没有错误,我在前端http://metalhouse.devpassion.eu/发现了一些奇怪的错误:
There has been an error processing your request
The PDO extension is required for this adapter but the extension is not loaded
Trace:
#0 /home/kiwikiwi/public_html/metalhouse/lib/Zend/Db/Adapter/Abstract.php(247): Zend_Db_Adapter_Pdo_Abstract->setFetchMode(2)
#1 /home/kiwikiwi/public_html/metalhouse/app/code/core/Mage/Core/Model/Resource.php(165): Zend_Db_Adapter_Abstract->__construct(Array)
#2 /home/kiwikiwi/public_html/metalhouse/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#3 /home/kiwikiwi/public_html/metalhouse/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_read')
#4 /home/kiwikiwi/public_html/metalhouse/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getConnection('read')
#5 /home/kiwikiwi/public_html/metalhouse/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(355): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
#6 /home/kiwikiwi/public_html/metalhouse/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(134): Mage_Core_Model_Resource_Db_Abstract->getReadConnection()
#7 /home/kiwikiwi/public_html/metalhouse/app/code/core/Mage/Core/Model/Config.php(1350): Mage_Core_Model_Resource_Db_Collection_Abstract->__construct(Object(Mage_Core_Model_Resource_Website))
#8 /home/kiwikiwi/public_html/metalhouse/app/code/core/Mage/Core/Model/Config.php(1386): Mage_Core_Model_Config->getModelInstance('core_resource/w...', Object(Mage_Core_Model_Resource_Website))
#9 /home/kiwikiwi/public_html/metalhouse/app/Mage.php(460): Mage_Core_Model_Config->getResourceModelInstance('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#10 /home/kiwikiwi/public_html/metalhouse/app/code/core/Mage/Core/Model/Abstract.php(208): Mage::getResourceModel('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#11 /home/kiwikiwi/public_html/metalhouse/app/code/core/Mage/Core/Model/Abstract.php(213): Mage_Core_Model_Abstract->getResourceCollection()
#12 /home/kiwikiwi/public_html/metalhouse/app/code/core/Mage/Core/Model/App.php(602): Mage_Core_Model_Abstract->getCollection()
#13 /home/kiwikiwi/public_html/metalhouse/app/code/core/Mage/Core/Model/App.php(460): Mage_Core_Model_App->_initStores()
#14 /home/kiwikiwi/public_html/metalhouse/app/code/core/Mage/Core/Model/App.php(344): Mage_Core_Model_App->_initCurrentStore('', 'store')
#15 /home/kiwikiwi/public_html/metalhouse/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#16 /home/kiwikiwi/public_html/metalhouse/index.php(80): Mage::run('', 'store')
#17 {main}
答案 0 :(得分:1)
为了运行Magento,您的服务器需要满足一些基本的软件要求。听起来你没有配置启用PDO的PHP。
您可以按照以下简单步骤测试服务器的兼容性:
/magento-check.php
您可以通过命令行轻松安装
pecl install pdo_mysql
然后在安装完成后,请务必将其添加到php.ini
并重新启动Apache / Nginx等。
extension=pdo_mysql.so
答案 1 :(得分:0)
Magento在PDO期间使用数据库。在您的服务器上,未安装此模块。或者没有在PHP上激活。
使用phpinfo()创建文件并检查它。如果未安装PDO,请与您的系统管理员或托管支持人员联系,并要求解决此问题。