I'm debugging a magento-plugin with eclipse & X-Debug on a local(host) Windows-System with a portable XAMPP-environment. And because it somehow writes properly in the DB, but doesn't reads/accepts DB-Output, I've to go step-by-step through the code.
Now eclipse started every action on the site with a long check,
if (version_compare(phpversion(), '5.3.0', '<')===true) {
so I commented that part out in a tired, weary, annoyed state of mind.
Well, eclipse didn't bother. Started 2 debugging sessions afterwards. But since closing eclipse, I get the pdo_mysql extension is not installed message.
All I did while using eclipse were minor changes inside the plugin. I was looking for the variable-contents. So I assumed it has to do with the version_compare and removed the comment. And if you check the error-trace below, you'll see, it never touches any (user)-plugin.
Didn't work.
Google said (in about the 50 cases I checked) either pdo_mysql.dll is commented in the php.ini or not installed. Both is not the case. The extension is activated extension=php_pdo_mysql.dll and all the Zend-folders exist and... it worked before.
Now I'm confused, what damage I've done and how to fix it... I don't want to set up the hole system again. Is there some kind of lock I've overseen? Or a switch I may deactivate?
By the way: Eclipse won't start it now either.
Here's the trace:
Trace:
#0 [projectpath]\lib\Zend\Db\Adapter\Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect()
#1 [projectpath]\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#2 [projectpath]\lib\Varien\Db\Adapter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#3 [projectpath]\app\code\core\Mage\Core\Model\Resource.php(179): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#4 [projectpath]\app\code\core\Mage\Core\Model\Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#5 [projectpath]\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#6 [projectpath]\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#7 [projectpath]\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter()
#8 [projectpath]\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(360): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
#9 [projectpath]\app\code\core\Mage\Core\Model\Resource\Db\Collection\Abstract.php(134): Mage_Core_Model_Resource_Db_Abstract->getReadConnection()
#10 [projectpath]\app\code\core\Mage\Core\Model\Config.php(1348): Mage_Core_Model_Resource_Db_Collection_Abstract->__construct(Object(Mage_Core_Model_Resource_Website))
#11 [projectpath]\app\code\core\Mage\Core\Model\Config.php(1380): Mage_Core_Model_Config->getModelInstance('core_resource/w...', Object(Mage_Core_Model_Resource_Website))
#12 [projectpath]\app\Mage.php(491): Mage_Core_Model_Config->getResourceModelInstance('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#13 [projectpath]\app\code\core\Mage\Core\Model\Abstract.php(208): Mage::getResourceModel('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#14 [projectpath]\app\code\core\Mage\Core\Model\Abstract.php(213): Mage_Core_Model_Abstract->getResourceCollection()
#15 [projectpath]\app\code\core\Mage\Core\Model\App.php(608): Mage_Core_Model_Abstract->getCollection()
#16 [projectpath]\app\code\core\Mage\Core\Model\App.php(466): Mage_Core_Model_App->_initStores()
#17 [projectpath]\app\code\core\Mage\Core\Model\App.php(349): Mage_Core_Model_App->_initCurrentStore('', 'store')
#18 [projectpath]\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#19 [projectpath]\index.php(87): Mage::run('', 'store')
#20 {main}
Update
I checked, there are no further php.inis. But the output of <?php phpinfo() ?> says:
Configure Command
cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--without-mssql"
"--without-pdo-mssql"
"--without-pi3web" "--with-pdo-oci=c:\php-sdk\oracle\x86\instantclient_12_1\sdk,shared" "--with-oci8-12c=c:\php-sdk\oracle\x86\instantclient_12_1\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--without-analyzer" "--with-pgo"
Now, that "--without-pdo-mssql" would explain something. But also it's weird as there is no c:\php-sdk\oracle in any kind of way...
Oh, I guess that were the compiler-settings, *cough*
php.inifiles though.. one for CLI, and one for your xampp instance. Make sure that both have the extension enabled.php.inifiles. In theapache\binfolder aren't any*.iniMaybe, because it's a "portable" version, idk. Eclipse neither works as CLI nor WEB Application