Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Fatal error: Call to a member function getOptions() on a non-object
 
Sofieken
Jr. Member
 
Total Posts:  10
Joined:  2010-10-24
 

Hi,

First my hosting provider installed Magento on a free hosting.
Now we copied everything to my virtual server.

I’m now getting the following error:

Fatal error: Call to a member function getOptions() on a non-object in /var/www/vhosts/www.trashilicious.com/httpdocs/app/Mage.php on line 298

Line 298 is highlighted in red:

if (is_null($key)) {
return self::$_objects;
} else {
return self::$_objects->load($key);
}
}

/**
* Retrieve application root absolute path
*
* @param string $type
* @return string
*/
public static function getBaseDir($type = ‘base’)
{
return self::getConfig()->getOptions()->getDir($type);
}

/**
* Retrieve module absolute path by directory type
*
* @param string $type
* @param string $moduleName
* @return string
*/
public static function getModuleDir($type, $moduleName)
{
return self::getConfig()->getModuleDir($type, $moduleName);

What should I do to fix this error?

Thank you very much!

Sofie

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sofieken
Jr. Member
 
Total Posts:  10
Joined:  2010-10-24
 

This problem is solved.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mafareed
Jr. Member
 
Total Posts:  11
Joined:  2010-04-28
 
Sofieken - 30 October 2010 07:36 AM

This problem is solved.

HOW DID YOU SOLVE THIS ISSUE?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brake6
Sr. Member
 
Total Posts:  87
Joined:  2008-09-23
 

Yes. I wonder how to solve that to.

Best regards, Magnus

 
Magento Community Magento Community
Magento Community
Magento Community
 
interllect
Jr. Member
 
Total Posts:  6
Joined:  2010-10-16
 

you solve this by using an older (stable) version like 1.4.0.1… newer versions always have this problem

 
Magento Community Magento Community
Magento Community
Magento Community
 
aashx
Jr. Member
 
Total Posts:  4
Joined:  2011-09-21
 

The following files and folders need their permissions set to the number ‘777’

/var/.htaccess
/app/etc
/var

 
Magento Community Magento Community
Magento Community
Magento Community
 
CheckMater
Jr. Member
 
Avatar
Total Posts:  7
Joined:  2012-03-24
 

The following files and folders need their permissions set to the number ‘777’

/var/.htaccess
/app/etc
/var

This solved my problem!… Thank you!

 
Magento Community Magento Community
Magento Community
Magento Community
 
elspood
Magento Team
 
Total Posts:  22
Joined:  2012-05-01
Magento
 
aashx - 19 October 2011 07:21 PM

The following files and folders need their permissions set to the number ‘777’

/var/.htaccess
/app/etc
/var

While this solution works, it is quite risky, as you have just granted world read/write access to those directories to any user that has access to your server.

Note the following statement in the installation documentation:

While you can change the directories to 777, this should never be done. It is a big security risk.

It is much safer to add your web server user account to a restricted group that owns those folders and chmod the folder to 750, instead.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top