0

I have a trouble with my Magento 2 - 500 page error in front and backend.

Error log:

2016/05/29 21:28:00 [error] 2681#2681: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Zend_Cache_Exception: cache_dir "/var/www/html/var/page_cache" is not writable in /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php:209

Stack trace:
#0 /var/www/html/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180): Zend_Cache::throwException('cache_dir "/var...')
#1 /var/www/html/lib/internal/Cm/Cache/Backend/File.php(82): Zend_Cache_Backend_File->setCacheDir('/var/www/html/v...')
#2 /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php(153): Cm_Cache_Backend_File->__construct(Array)
#3 /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true)
#4 /var/www/html/vendor/magento/framework/App/Cache/Frontend/Factory.php(154): Zend_Cache::factory('Magento\\Framewo...', 'Cm_Cache_Backen...', Array, Array, true, true, true)

My Server Centos 7
Nginx 1.10
Php7
Mysql 5.6

I have already changed 777 page_cache directory.

Can anyone help me to solve this problem?

1

Try letting the folder have read and write permission (i.e.: changing the permission to 777) to var directory, this worked for me for Magento 2.1.

Ensure you are using recursive option.

chmod -Rf 777 <magento install directory>/var/
0

Please run the following command that works for me.

sudo chmod -R 777 page_cache

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.