Call to a member function getAllOptions Mage-Core-Model-Cache

Wednesday, 14. November 2012

I came across this error today when moving file from live server to development server using git

Fatal error: Call to a member function getAllOptions() on a non-object in /app/code/core/Mage/Core/Model/Cache.php on line 455

After some head scratching it came to the fact that the download was missing an important config file

app/etc/config.xml

Add that and WootWoot!!

Zend_Cache_Exception can’t get apc memory size

Thursday, 12. April 2012

trying to run Magento indexes on command line is an excellent way to get things done rather quickly. However there are times it can be rather annoying and more so when performance enhancement measueruses such as APC cache is in place.

A common error with APC cache exception ‘Zend_Cache_Exception’ with message ‘can’t get apc memory size’ in lib/Zend/Cache.php:209 can be very annoying and if like me you have been scratching your head over this, the post may be your solution.

After soul searching I came to find out this is merely a configurations issue and the most common settings you need are these below.

 
extension=apc.so
apc.shm_size=512
apc.num_files_hint=10000
apc.user_entries_hint=10000
apc.max_file_size=5M
apc.enable_cli=1    # VERY IMPORTANT

You will need to add these entries to your apc.ini file that can be found (at least on my server)

/etc/php5/conf.d/apc.ini

REMEMBER you will need to restart apache for these changes to take effect.

Enjoy

Magento online customer shows 127.0.0.1 instead of real IP address

Tuesday, 10. April 2012

Came across this issue today when client mentioned after the move to new server all of a sudden all online customers IP address were showing as 127.0.0.1 instead of their correct IP address.

This is a proxy issue and the best solution lies within the local.xml.additional file.

Basically you will need this snippet text below added to you local.xml file just before the closing of the tag

   ...
   <remote_addr_headers>
       <header1>HTTP_X_REAL_IP</header1>
       <header2>HTTP_X_FORWARDED_FOR</header2>
   </remote_addr_headers>
   ...

Make sure you FLUSH MAGENTO CACHE to see changes.

Enjoy :)

Magento currency ‘USD’ not found

Saturday, 3. December 2011

After restarting the memcached – I received this error and here how I went about resolving this.

Run Compiler Again

Systems > Tools > Compilation > Run compiler

Flush the Cache

The System > Cache management > Flush Cache Storage.

Alternatively:
Remove all the files from var/* (especially cache, locks and sessions)

If you are running Memcache – You may want to

killall memcache

Then: restart again

/usr/local/nserver/memcached/bin/memcached -d -uroot -m512 -p11211 start