0

On my Ubuntu server VM, remotly debugged with Xdebug & Netbeans I search for a long time why no product images get viewed. Afte I debug all the processing, I found the mistake. I don't have GD2 installed. No errors where shown in logfiles (display errors enabled, renaming of /errors/local.xml & checking permissions of var/log/).

On lib/Varien/Image/Adapter/Gd2.php / Line 565-572 there is a dependencies check:

public function checkDependencies()
{
    foreach( $this->_requiredExtensions as $value ) {
        if( !extension_loaded($value) ) {
            throw new Exception("Required PHP extension '{$value}' was not loaded.");
        }
    }
}

But I don't see any error in browser or exception log. Anybode know why? With netbeans and xdebug I can't debug what happens with the thrown exception.

Thanks!

1 Answer 1

0

Throwing an exception doesn't necessarily mean it gets logged by Magento. For Magento to log the thrown exception, it would have to wrapped in a try catch statement that utilizes Magento's log functions:

try {
    throw new Exception('Message');
} catch (Exception $e) {
    Mage::logException($e);
}

If Magento does not catch the exception, it gets logged in your PHP error logs instead (Assuming they are turned on). Instead of looking in Magento's var/log folder, you should be looking in the PHP error logs (/var/log/php_errors.log on Linux or whatever the Windows equivalent is)

Another note to add. If Magento catches the exception but does nothing with it, it won't get logged anywhere which could be the case here.

Magento 1.9 Prerequisites, can be found here: http://docs.magento.com/m1/ce/user_guide/magento/system-requirements.html

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.