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

Erro:  Call to a member function getOptions() … /app/Mage.php on line 298
 
Carlos Adriano
Jr. Member
 
Total Posts:  1
Joined:  2010-03-26
 

Olá pessoal, está dando o seguinte erro na minha loja

Fatal error: Call to a member function getOptions() on a non-object in /home/httpd/vhosts/wi10.com.br/subdomains/lojademo/httpdocs/app/Mage.php on line 298

Ela está no domínio http://lojademo.wi10.com.br/

Eu instalei ela no meu computador http://localhost/magento/ depois modifiquei o app/etc/config.xml e o app/etc/local.xml com os novos dados de conexão com o banco de dados.

O host que estou utilizando é a Locaweb e estou instalando em um dos domínios da minha revenda.

Se puderem me ajudar serei muito grato.
Abraço!

 
Magento Community Magento Community
Magento Community
Magento Community
 
junomedia
Sr. Member
 
Avatar
Total Posts:  142
Joined:  2008-09-10
Nottingham, England
 

Hello,

I am also getting this error, I have checked PHP and it is NOT running in Safe Mode. Any other ideas what may be the cause?

Regards,

Andy.

 
Magento Community Magento Community
Magento Community
Magento Community
 
EYEMAGINE
Member
 
Avatar
Total Posts:  35
Joined:  2008-02-14
Irvine, CA
 

Verify that the [base directory]/var/ directory is write-able. 

If it is, then add this to your .htaccess and refresh the home page:

SetEnv MAGE_IS_DEVELOPER_MODE true
 
Magento Community Magento Community
Magento Community
Magento Community
 
MageTitan
Member
 
Avatar
Total Posts:  58
Joined:  2009-10-16
Salt Lake City, Utah USA
 

Many times this means the web server does not have access to write to your filesystem. In my case, it was apache running as the wrong user. If you’re using apache, be sure the user in the httpd.conf file has access to write to your files.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tuppi Sau
Member
 
Total Posts:  34
Joined:  2010-01-18
 
eyemagine - 17 August 2010 08:05 AM

Verify that the [base directory]/var/ directory is write-able. 

If it is, then add this to your .htaccess and refresh the home page:

SetEnv MAGE_IS_DEVELOPER_MODE true

After I followed your instruction I got the following screen:

Notice: Undefined index:  0 in /var/www/vhosts/[DomainUser]/httpdocs/app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

#0 /var/www/vhosts/[DomainUser]/httpdocs/app/code/core/Mage/Core/Model/Mysql4/Config.php(92): mageCoreErrorHandler(8, ‘Undefined index...’, ‘/var/www/vhosts...’, 92, Array)
#1 /var/www/vhosts/[DomainUser]/httpdocs/app/code/core/Mage/Core/Model/Config.php(344): Mage_Core_Model_Mysql4_Config->loadToXml(Object(Mage_Core_Model_Config))
#2 /var/www/vhosts/[DomainUser]/httpdocs/app/code/core/Mage/Core/Model/App.php(366): Mage_Core_Model_Config->loadDb()
#3 /var/www/vhosts/[DomainUser]/httpdocs/app/code/core/Mage/Core/Model/App.php(295): Mage_Core_Model_App->_initModules()
#4 /var/www/vhosts/[DomainUser]/httpdocs/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#5 /var/www/vhosts/[DomainUser]/httpdocs/index.php(80): Mage::run(’’, ‘store’)
#6 {main}

Can you please suggest further, thanx.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tuppi Sau
Member
 
Total Posts:  34
Joined:  2010-01-18
 
Tuppi Sau - 01 November 2010 10:06 PM

eyemagine - 17 August 2010 08:05 AM
Verify that the [base directory]/var/ directory is write-able. 

If it is, then add this to your .htaccess and refresh the home page:

SetEnv MAGE_IS_DEVELOPER_MODE true

After I followed your instruction I got the following screen:

Notice: Undefined index:  0 in /var/www/vhosts/[DomainUser]/httpdocs/app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

#0 /var/www/vhosts/[DomainUser]/httpdocs/app/code/core/Mage/Core/Model/Mysql4/Config.php(92): mageCoreErrorHandler(8, ‘Undefined index...’, ‘/var/www/vhosts...’, 92, Array)
#1 /var/www/vhosts/[DomainUser]/httpdocs/app/code/core/Mage/Core/Model/Config.php(344): Mage_Core_Model_Mysql4_Config->loadToXml(Object(Mage_Core_Model_Config))
#2 /var/www/vhosts/[DomainUser]/httpdocs/app/code/core/Mage/Core/Model/App.php(366): Mage_Core_Model_Config->loadDb()
#3 /var/www/vhosts/[DomainUser]/httpdocs/app/code/core/Mage/Core/Model/App.php(295): Mage_Core_Model_App->_initModules()
#4 /var/www/vhosts/[DomainUser]/httpdocs/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#5 /var/www/vhosts/[DomainUser]/httpdocs/index.php(80): Mage::run(’’, ‘store’)
#6 {main}

Can you please suggest further, thanx.

I found the solution myself, if anyone need it it is at this link:

http://www.sharpdotinc.com/mdost/2009/03/17/magento-error-message-notice-undefined-index-0-appcodecoremagecoremodelmysql4configphp-on-line-92/

 
Magento Community Magento Community
Magento Community
Magento Community
 
mafareed
Jr. Member
 
Total Posts:  11
Joined:  2010-04-28
 
Tuppi Sau - 01 November 2010 10:25 PM

Tuppi Sau - 01 November 2010 10:06 PM

I found the solution myself, if anyone need it it is at this link:

http://www.sharpdotinc.com/mdost/2009/03/17/magento-error-message-notice-undefined-index-0-appcodecoremagecoremodelmysql4configphp-on-line-92/

THIS LINK IS ABOUT A DIFFERENT ERROR.... ANY OTHER SOLUTIONS FOR “Call to a member function getOptions() on a non-object in app/Mage.php on line 298” ??????

 
Magento Community Magento Community
Magento Community
Magento Community
 
mcaskey
Jr. Member
 
Avatar
Total Posts:  7
Joined:  2008-06-08
Denver, Colorado
 

Same problem here.  MAMP pro setup.  It was a permissions issue on files… The fix for me was to change the user that MAMP uses by default for apache mysql access, to the same user I’m logged in as on my Mac.

 
Magento Community Magento Community
Magento Community
Magento Community
 
harsh1212
Jr. Member
 
Total Posts:  21
Joined:  2010-07-20
 

Hey ho_nl

Thanks , i have same problem and i have check the .htaccess file and code for fast CGI, means enable CGI .

right now, there is safe_mode on in my php that’s y i have do above thing .

and My Problem solved , You Rock rasberry

Thanks
Harsh

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

If you still have the problem try this:

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

/var/.htaccess
/app/etc
/var

It solved my problem. smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
rizqaluv
Jr. Member
 
Total Posts:  16
Joined:  2013-07-02
 

I am also getting this error, I have checked PHP and it is NOT running in Safe Mode. Any other ideas what may be the cause?

Regards,
Rizqa

 
Magento Community Magento Community
Magento Community
Magento Community
 
ash_115
Jr. Member
 
Total Posts:  7
Joined:  2012-06-14
 

Thanks for the info. I’m also running MAMP Pro and I just had to change the permissions of the var folder.

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