2

I recently updated my Magento from 1.4 to 1.9 and faced with the issue: it gives HTTP-header 500 Internal Server Error, but all the content is still loading (so just instead 200 OK I have 500 Internal Server Error).

It's interesting, that the CMS pages comes with 200 OK. The problem is exists only within the store pages (i. e. catalog, product, etc).

What have I tried:

  • temporarily removed .htaccess
  • double checked the config table's the proper paths
  • tried all the solutions suggested in this article as well as this one
  • disabled all the custom modules

Update:

I looked on the logfile and noticed that it shows the following PHP Fatal Error: Cannot redeclare class Mage_Catalog_Model_Product in /var/www/app/code/core/Mage/Catalog/Model/Product.php on line 2073

To catch this error I've put on the beginning of this file before the class declaration the following code:

if ( class_exists( 'Mage_Catalog_Model_Product', FALSE ) ) {
    $reflector = new ReflectionClass( 'Mage_Catalog_Model_Product' );
    Mage::log($reflector->getFileName(),Zend_log::DEBUG );
} 

which showed this line: 2014-09-07T08:42:47+00:00 DEBUG (7): /var/www/app/code/core/Mage/Catalog/Model/Product.php

So, as far as I understand, the class redeclares in the same php file! How to avoid that?

2
  • Are you seeing any errors being reported in php error logs ? Commented Sep 7, 2014 at 8:12
  • @JamesCowie thanks for your comment, I've updated my question. Commented Sep 7, 2014 at 8:49

1 Answer 1

1

Ok, I've solved the issue by removing the line include('Mage/Catalog/Model/Product.php'); from my rewriting class.

So probably now it isn't necessary for class rewriting because of autoloading system.

0

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.