3

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*

2
  • I would tend to agree with google on this one. Usually you have at least two php.ini files though.. one for CLI, and one for your xampp instance. Make sure that both have the extension enabled. Commented Aug 12, 2015 at 14:34
  • No, there aren't anymore php.ini files. In the apache\bin folder aren't any *.ini Maybe, because it's a "portable" version, idk. Eclipse neither works as CLI nor WEB Application Commented Aug 12, 2015 at 16:08

3 Answers 3

1

There are normally 2 php.ini files.

You need to check the one in the apache\bin folder.

If you checked the one in the php\ folder that is only used by PHP CLI ( Command Line Interface )

If you cannot find the ini file then code a quick script like this and run it.

<?php
    phpinfo();
?>

Look at the output, in the first section there is a label called Loaded Configuration File, that should show you where the php.ini file is located.

Sign up to request clarification or add additional context in comments.

4 Comments

The aren't any *.ini files in apache\bin . Maybe because ist a portable version. And there are no further php.ini in the whole xampp-folder and subfolders.
See additional info on how to find your php.ini file
Loaded Configuration File ...protableapps\xampp\php\php.ini Scan this dir for additional .ini files (none) Additional .ini files parsed (none)
Table: PDO support - enabled Row: PDO drivers - no value
0

Ok, this is absolutely unexplainable to me, but Xampp totally messed up! I hadn't touched anything there, but a bit later even phpmyadmin refused to work. Setting up the whole Xampp-Environment solved the case.

To complete the information:
I reinstalled magento (moved the magento folder to it's new destination, deleted app\etc\local.xml , created DB and opened the shop-url for installation instructions).
The plugins were integrated right from the start. I might as well had the DB restored as I have the files on disc, but I only need some sample data. Had to set up XDebug from the start. But now everything is back to normal.

Thank you for your help!

Comments

0

For me I had PHP installed to my Windows machine along with a separate install of XAMPP which had its own version of PHP

Magento used C:/xampp/php's php.ini file, but my command line was using my separate PHP installation that I had setup in my environmental variables that was at C:/php

Comments

Your Answer

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.