Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento cache not getting cleared

I had some configuration issues in my local.xml, which I cannot load my magento frontend nor my admin panel, then I fixed the issue I had in my local.xml, and to get my new config to be loaded, I deleted everything in /var/cache and even whats there in /var/session folders. But to my surprise Magento still loads the old local.xml settings.

I tried with restarting apache and cleared my browser cache, nothing works.

Any ideas??

like image 218
Thanu Avatar asked Jul 17 '12 02:07

Thanu


2 Answers

To make changes in core configurations and have them stick (local.xml, base urls, etc.) you need to clear your Magento code cache, often by actually manually deleting the mage--? subfolders in var/cache/.

Cached configuration can cause all sorts of headaches including having the base urls still pointing back to the original Magento installation (different folders, different server) despite the fact that you can use phpMyAdmin and see that the rows have been updated in the database. Configuration will not be reread from the database until the cached configuration information is deleted.

Another place where stuff gets stuck is in your APC op-code cache if you’re using it. Use the apc.php administration page to clear that as well. Stopping and restarting Apache will achieve the same result

And last of all, IF YOU DO NOT HAVE PERMISSIONS SET PROPERLY ON var/cache/ AND var/tmp/ SO THEY’RE BOTH READABLE AND WRITABLE TO YOUR WEB SERVER, Magento may store the cached information in the system /tmp directory which means that no amount of clearing Magento’s cache will make the cached configs go away until someone reboots the server, the system /tmp directory gets cleared and Magento seemingly automagically reads its configs. Or you're told about it and you have access to delete the Magento cache out of /tmp. Here's some documentation of this happening in the system temporary storage folder off of root (see images)

Note: If you save a backup copy of your local.xml file, make sure to rename it to something like local.xml.sv1 or you will find that Magento still reads it.

Magento Folder in system /tmpMagento Cache in system /tmp

like image 129
Fiasco Labs Avatar answered Oct 10 '22 22:10

Fiasco Labs


Manage to Solve the issue and its the weirdest thing ever. When I change the local.xml to fix the issue I put a backup of the old file saying local_back.xml. I just delete that file and now everything is working fine. No idea why Magento pick that file up. Any ways issue has been solved.

Note : See comments below for more details, it is the .xml file extension

like image 20
Thanu Avatar answered Oct 11 '22 00:10

Thanu