Failed to write cache file error in Symfony 2.6.1 usually file permissions for cache folders

This error thrown in Symfony 2.6.1 was resolved by going to the app directory of the Symfony site and running the following chmod permission changes.  Make sure you have root permissions!

Whoops, looks like something went wrong.

1/1 RuntimeException in ClassCollectionLoader.php line 239: Failed to write cache file “/home/subdomain/public_html/app/dev/cache/classes.php”.

Note: For the “chmod” command, dash R (-R) is recursive, meaning it will change the permissions of all contents in the folder and any files inside any other folders within it. Be careful changing permissions to 777, first try 755, which restricts permissions more safely.

Aaron Belchamber has written 243 articles

Leave a Reply

Your email address will not be published. Required fields are marked *