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
Alex
13.5k20 gold badges85 silver badges169 bronze badges
-
are you using modman?Kristof at Fooman– Kristof at Fooman2014年10月16日 11:28:30 +00:00Commented Oct 16, 2014 at 11:28
-
We use composer on the dev environment. But on the target machine no composer is used.Alex– Alex2014年10月16日 12:41:29 +00:00Commented Oct 16, 2014 at 12:41
-
1@Alex, have you diagnosed the issue and found any solution?mageUz– mageUz2015年01月16日 18:01:58 +00:00Commented Jan 16, 2015 at 18:01
-
1We found out that a mixture of absolute and relative paths in the require_once statements caused problems and resolved it by adding DIRAlex– Alex2015年01月16日 18:50:29 +00:00Commented Jan 16, 2015 at 18:50
1 Answer 1
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
Alex
13.5k20 gold badges85 silver badges169 bronze badges
-
Hi alex is this issue now solved?David Manners– David Manners2015年01月23日 17:17:50 +00:00Commented Jan 23, 2015 at 17:17
default