1

The problem occurs in a Magento 1.9.2.4 installation (upgraded from 1.7.2 and then migrated to this new VPS)

Trying to run the cron.sh on a centos VPS (DirectAdmin Controlpanel)

This is returns the following error;

PHP Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'pdo_mysql extension is not installed' in /home/user/domains/domain.com/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php:372
Stack trace:
#0/home/user/domains/domain.com/public_html/lib/Zend/Db/Adapter/Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect()
#1/home/user/domains/domain.com/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#2/home/user/domains/domain.com/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#3/home/user/domains/domain.com/public_html/app/code/core/Mage/Core/Model/Resource.php(179): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#4/home/user/domains/domain.com/public_html/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Res in /home/user/domains/domain.com/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 372

(same happens with cron.php)

"php -m" is showing PDO /pdo_mysql /pdo_sqlite

Also the modules are showing the phpinfo file

PDO Drivers enabled are mysql, sqlite

Server is running Php 5.6.11 (php-fpm56) & MySQL 5.5.31

i am a bit at a loss here as the extension is installed and from what I understand it should be available for CLI if it shows in php -m?

Fabian Schmengler
66.2k25 gold badges191 silver badges422 bronze badges
asked Jul 10, 2016 at 12:50

1 Answer 1

1

Try running

sudo apt-get install php5.6-mysql

You may want to remove any other version first, like php7.0-mysql or php5.5-mysql. Be careful as this will remove configuration files.

sudo apt-get purge php7.0-mysql
answered Jul 11, 2016 at 19:02

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.