I am trying to login from the admin side of my site. But it is not logging me in with the correct user-name and password provided.

I cleared browser history and tried in other browsers also.

It gives me an error :

Fatal error: Access to undeclared static property: Mage::$_isDeveloperMode in /home//public_html/one/em0113-full-package /app/Mage.php on line 881

Help me to resolve this issue.

  • its really the greatest co incidence that, after posting 1st answer in Aug 24 '15 exactly after 1 year, 2nd answer is posted on Aug 24 '16 ..... – Baby in Magento Feb 17 '17 at 9:12

I suspect a core hack here. The error is pointing to this lines of code :

public static function getIsDeveloperMode()
    return self::$_isDeveloperMode;

The method simply returns a static property $_isDeveloperMode of the class app\Mage.php. You can find that the definition of that static property in that file itself in line 117 (magento 1.9.1) like this.

static private $_isDeveloperMode = false;

So what you need to do here is, either add this single line inside app\Mage.php or

the best option is replace your BADLY HACKED Mage.php file with the default Mage.php file. You didn't specify the version of Magento used. So use Mage.php file from same version.

| improve this answer | |
  • i replaced the Mage.php its worked.... – Baby in Magento Aug 24 '15 at 5:15
  • 1
    @BabyinMagento2 that's it. Happy to hear that it helped – Rajeev K Tomy Aug 24 '15 at 5:29

Shouldn't update Mage.php file.

This issue can be easily resolved by either of the following methods:

  1. In index.php look for the following code: if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) { Mage::setIsDeveloperMode(true); }

Change "true" to "false"

2.In .htaccess you should see something like : SetEnv MAGE_IS_DEVELOPER_MODE "true

Comment this code out so it will be #SetEnv MAGE_IS_DEVELOPER_MODE "true

| improve this answer | |
  • Welcome to community , you are absolutely right, Thanks a lot for your guidance, i remember i replaced original Mage.php file , cheers :-) – Baby in Magento Aug 24 '16 at 10:21

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.