dpdbu24262 2015-01-21 12:02
浏览 38
已采纳

当DLO未加载时,Magento Cron作业失败

I am trying to run the Magento Cron job but get this error message. I checked phpinfo() which shows everything should be loaded and the get_loaded_extensions() shows => PDO [27] => pdo_mysql [28] => pdo_sqlite [29]

Any thoughts what I can do next to find the cause?

Thanks, Chris

PHP 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/k117235a/domains/greenman-chris.eu/private_html/lib/Zend/Db/Adapter/Pdo/Abstract.php:342
Stack trace: 
#0 /home/k117235a/domains/greenman-chris.eu/private_html/lib/Zend/Db/Adapter/Abstract.php(248): 
Zend_Db_Adapter_Pdo_Abstract->setFetchMode(2) 
#1 /home/k117235a/domains/greenman-chris.eu/private_html/app/code/core/Mage/Core/Model/Resource.php(175): 
Zend_Db_Adapter_Abstract->__construct(Array)
#2 /home/k117235a/domains/greenman-chris.eu/private_html/app/code/core/Mage/Core/Model/Resource.php(110): 
Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#3 /home/k117235a/domains/greenman-chris.eu/private_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): 
Mage_Core_Model_Resource->getConnection('core_write')
#4 /home/k117235a/domains/greenman-chris.eu/private_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract 
in /home/k117235a/domains/greenman-chris.eu/private_html/lib/Zend/Db/Adapter/Pdo/Abstract.php 
on line 342
  • 写回答

3条回答 默认 最新

  • donglan9517 2015-01-21 12:12
    关注

    Probably you are checking the phpinfo() from the browser, but the extension might be loaded just for apache/nginx, and not for commandline, which is how I'm assuming the cronjob php file will run.

    Check that the extension is enabled for CLI, typically in the following location:

    /etc/php5/cli/conf.d/20-pdo_mysql.ini (the name might not be exactly the same)
    

    It might be only on /etc/php5/apache2/ or /etc/php5/php-fpm/

    You can just copy it from the other locations or create a new file with the following content:

    extension=pdo_mysql.so
    

    After that check that the extension is loaded by running from command-line:

    php -i | grep pdo
    

    If it's loaded you should see some output and the cronjob should now work.

    I hope it helps.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题