So last weekend after watching Matt’s video I implemented a cron job via Cpanel to clear the cache daily, but unfortunately it is not executing as expected.
The command used was php /home/xxx/public_html/shell/clearcaches.php -all and this was the result:
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/xxx/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php:342
#0 /home/xxx/public_html/lib/Zend/Db/Adapter/Abstract.php(248): Zend_Db_Adapter_Pdo_Abstract->setFetchMode(2)
#1 /home/xxx/public_html/app/code/core/Mage/Core/Model/Resource.php(175): Zend_Db_Adapter_Abstract->__construct(Array)
#2 /home/xxx/public_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/xxx/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection(‘core_write’)
#4 /home/xxx/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection(‘write’)
#5 /home/xxx/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(335) in /home/xxx/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php on line 342
From reading the output it appears that there is an extension PDO which is not loading and I have no idea how to correct.
Hoping someone can offer a solution.
Stephen Maguire said
Uncaught exception ‘Zend_Db_Adapter_Exception’ with message ‘The PDO extension is required for this adapter but the extension is not loaded’
Send that message to your host and ask them to install the PDO extension on the server. That should sort it :)
Thank you for your response.
Contacted SimpleHelix support and they indicated this is the correct script due to running on a litespeed server:
/usr/local/lsws/fcgi-bin/lsphp5 /home/xxx/public_html/shell/clearcaches.php -all
The issue was that you need to run PHP scripts using the litespeed PHP binary on the server otherwise you may encounter issues.
You can do so by using: /usr/local/lsws/fcgi-bin/lsphp5
The normal PHP binary would be : php
Why Should You Join UnderstandingE?
- Access to over 500 step-by-step video tutorials
- +20 video courses available
- Magento, M2E Pro, Magmi, eBay, Amazon & Design all covered
- Everything is in 100% Plain English
- Learn how to build your own multi-channel software for eBay & Amazon
- Access to the community forums, meet fellow business owners like yourself
Join Now with 2 Clicks
Join now for less that £1 per day you can gain access to over 400 step-by-step video tutorials & learn how to build your very own multi-channel software.
Most Users Ever Online: 1012
Currently Browsing this Page:
Jim @ Moogento: 688
Steve Froggatt: 514
Badeth - UE: 513
Paul Cartwright: 414
Administrators: Matthew Ogborne: 4565, Dave Furness: 4606