The site started throwing exceptions on both the front & backend. After disabling redis, memcached & the full page cache and reverting to using files for sessions, the site seems to function correctly. However, when running the following code:
$var_dir = Mage::getModel('core/config')->getVarDir(); echo $var_dir;
Magento prints out
I believe this is what was causing the original issue. I read the following article - Stop Magento Writing to /tmp - which mentions:
Magento itself chooses to try /tmp/magento/ if the var/ folder is not writable.
I checked the permissions on the folder & they are set correctly to 755 (I even tried changing this to 2755) & the owner is also correctly set. Even though that is the case, Magento still doesn't see said directory as writeable. (For interest sake, nor does it see the
app/etc/modules directory as writeable.
I've spoken with the host & we attempted to stop PHP & restart apache after removing the
/tmp/magento directory, but Magento just created it again.
Has anybody seen this behaviour before? How can I correct it so that Magento starts writing to the correct webroot