A client called us very early this morning and told us that after he updated to Joomla 3.6 (from Joomla 3.5.1), he was seeing the following fatal error on the Joomla backend:
The File Cache Storage is not supported on this platform.
We immediately investigated the issue (it was around 5 AM), and we realized that it was caused by the following code in the storage.php which is located under the libraries/joomla/cache folder:
// Validate the cache storage is supported on this platform if (!$class::isSupported()) { throw new RuntimeException(sprintf('The %s Cache Storage is not supported on this platform.', $handler)); }
Tracing the isSupported function, we found out that it is located (for that particular scenario) in the file.php file which, in turn, is located under the libraries/joomla/cache/storage folder. Here is its code:
public static function isSupported() { return is_writable(JFactory::getConfig()->get('cache_path', JPATH_CACHE)); }
So cache_path, which is (almost always) JPATH_CACHE, which translates to the cache folder or to the administrator/cache folder (depending on whether the user is browsing the frontend or the backend) is not writable by Joomla (e.g. it is not writable by the web server, which was Apache in the case of our client).
Since the issue was only happening on the backend, then this meant that the folder administrator/cache was not writable. So, in order to fix the problem, all that we had to do was to change the permissions and the ownership on that folder to make it writable by Joomla.
Why was the problem only happening on the backend?
The problem was only happening on the backend because the cache folder, located under the root directory of the Joomla website, was writable, but the one under the administrator folder wasn’t.
Why is this suddenly an issue with Joomla 3.6?
Previous versions of Joomla did not have the RuntimeException statement when the cache folder wasn’t writable. They were silently handing the issue by just not caching the content, which is the right way to do things. We think that this problem will cause the Joomla core developers to act and revert that change.
In any case, if you’re having this error on your Joomla website, then make sure that you have both the cache and the administrator/cache folders writable by your web server. If you need any help, then please contact us. Our fees are super affordable, our work is fast and professional, and we are the friendliest Joomla developers on planet Earth!
I love you guys. Had the same issue and solved it in a couple of minutes thanks to you!
So how do I change the change the permissions and the ownership on that folder to make it writable by Joomla. I already looked at permissions and they are writable… See below:
drwxr-xr-x 2 root root 4096 Aug 4 22:44 cache
Hi Bill,
Are you sure that your Apache instance can write to folders owned by root? Typically, that shouldn’t be the case.
Try uploading an image to your media manager and then check the ownership and the group ownership of that image in the Linux shell. Assuming that it is owned by [bcory], then you will need to do the following on your cache folder:
chown -R bcory cache
chgrp -R bcory cache
Hi, I tried to make all Cache folders in the Joomla folder writable: “cache, administrator/cache, libraries/joomla/cache”, etc. The problem is not solved, the web page is not available.
Hi Adrian,
I would say there is another problem on your website – or maybe the ownership of these files is wrong. Note that the “libraries/joomla/cache” folder is for the caching engine, and not used for cached files, so you needn’t change its permissions.
I got the same problem after installing Joomla 3.7.3 on CentOS 7 with PHP 5.6.x. When I changed public $cache_handler = ‘file’ to
public $cache_handler = ”, the error message is gone, but I see another error message when i try to save any setting:
0 Could not write to the configuration file
I tried to change the permissions on the configuration.php to 777, but the same error message is displayed. The ownership of the cache and administrator/cache are apache:apache.
What can I do to solve these problem? Thanks a lot!
Hi Ronald,
This is likely a permission/ownership issue on the file or the higher folder (e.g. the public_html folder).
Regarding the “Error of the file cache storage”:
Go to configuration.php and put:
public $cache_handler = '';