2

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?

  • are you using modman? – Kristof at Fooman Oct 16 '14 at 11:28
  • We use composer on the dev environment. But on the target machine no composer is used. – Alex Oct 16 '14 at 12:41
  • 1
    @Alex, have you diagnosed the issue and found any solution? – mageUz Jan 16 '15 at 18:01
  • 1
    We found out that a mixture of absolute and relative paths in the require_once statements caused problems and resolved it by adding DIR – Alex Jan 16 '15 at 18:50
0

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

  • Hi alex is this issue now solved? – David Manners Jan 23 '15 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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