Magento Shell Script Debugging – Class Mage Not Found on Some Servers

debuggingshell

We have a custom script in shell with
require_once 'abstract.php'; and our class extends Mage_Shell_Abstract.

On our dev environments this is working fine, but on staging we get the error

PHP Fatal error:  Class 'Mage' not found in /var/www/foo/public/shell/abstract.php on line 86

What can be the reason?

Best Answer

There seems to be a PHP bug caused by mixing relative and absolute paths. See stackexchange https://stackoverflow.com/q/26885077/288568

Related Topic