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?

asked Oct 16, 2014 at 11:07
4
  • are you using modman? Commented Oct 16, 2014 at 11:28
  • We use composer on the dev environment. But on the target machine no composer is used. Commented Oct 16, 2014 at 12:41
  • 1
    @Alex, have you diagnosed the issue and found any solution? Commented Jan 16, 2015 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 Commented Jan 16, 2015 at 18:50

1 Answer 1

0

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

answered Jan 16, 2015 at 19:06
1
  • Hi alex is this issue now solved? Commented Jan 23, 2015 at 17:17

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.