I have a problem with magento command : php shell/indexer.php reindexall
Stack trace:
0 /home/taatoo/www/lib/Zend/Db/Adapter/Abstract.php(459): > Varien_Db_Adapter_Pdo_Mysql->_connect()
1 /home/taatoo/www/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
2 /home/taatoo/www/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
3 /home/taatoo/www/app/code/core/Mage/Core/Model/Resource.php(169): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
4 /home/taatoo/www/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
5 /home/taatoo/www/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
6 /home/taatoo/www/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core in /home/taatoo/www/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 302
Lines 301/302/303 are :
if (!extension_loaded('pdo_mysql')) {
throw new Zend_Db_Adapter_Exception('pdo_mysql extension is not installed');
}
Or, if I execute print_r(get_loaded_extensions());
in /home/project/www/ or /home/project/www/lib/Varien/Db/Adapter/Pdo/ I correctly get the "pdo_mysql" extension.
I also get true
if I do var_dump(extension_loaded('pdo_mysql'));
in this script.
But false
if I do the same things in /home/project/www/lib/Varien/Db/Adapter/Pdo/Mysql.php