Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fatal error: Call to a member function getModelInstance() on a non-object in /Applications/XAMPP/xamppfiles/htdocs/magento/app/Mage.php on line 463

I install magento 1.9.0.0 and copy to my xampp htdocts when I run localhost/magento this error shows,i've done the solutions but it didn't work.

Fatal error: Call to a member function getModelInstance() on a non-object in    
 /Applications/XAMPP/xamppfiles/htdocs/magento/app/Mage.php on line 463

Here is the code script:

public static function getModel($modelClass = '', $arguments = array())
  {
    return self::getConfig()->getModelInstance($modelClass, $arguments);
  }
like image 450
user3728443 Avatar asked Aug 07 '14 05:08

user3728443


1 Answers

In case you are getting this error while trying to access Magento outside in a script

The solution given here should be considered first before playing with permissions.

Mage::init(); // 1.5+

Mage::app(); // (pretty much anything) below 1.5

like image 61
Imran Zahoor Avatar answered Sep 21 '22 08:09

Imran Zahoor