1

I did some changes on my magento installation (inside admin panel) but for no logical reason my magento showed me HTTP ERROR 500 I am trying the commands php bin/magento setup:upgrade but everything going ok. Can anyone help me for what is that happend? I tried to reindex and to flush cache. My installation is based on plesk and centos 7 Thank you

Suspicious Server Logs from Plesk: 1)Apache error

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught 
Zend_Cache_Exception: cache_dir 
"/var/www/vhosts/domain/httpdocs/var/cache/" is not writable in /var/www/vhosts/domain/httpdocs/vendor/magento/zendframework1/library/Zend/Cache.php:209\nStack trace:\n#0 /var/www/vhosts/domain/httpdocs/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180): Zend_Cache::throwException('cache_dir "/var...')\n#1 /var/www/vhosts/domain/httpdocs/vendor/colinmollenhour/cache-backend-file/File.php(87): Zend_Cache_Backend_File->setCacheDir('/var/www/vhosts...')\n#2 /var/www/vhosts/domain/httpdocs/vendor/magento/zendframework1/library/Zend/Cache.php(153): Cm_Cache_Backend_File->__construct(Array)\n#3 /var/www/vhosts/domain/httpdocs/vendor/magento/zendframework1/library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true)\n#4 /var/www/vhosts/domain/httpdocs/vendor/magento/framework/App/Cache/Frontend/Factory.php(155): Zend_Cache::factory('Magento\\\\Framewo...', 'Cm_Ca...\n'
6
  • Anything in your system.log or exception.log?
    – DanCarlyon
    May 14, 2018 at 14:46
  • Also what did you save in the admin? This does count as a change so i have suggested an edit to your title
    – DanCarlyon
    May 14, 2018 at 14:47
  • @dancarlyon No there is no such a file on my /var/log system May 14, 2018 at 14:47
  • I would be looking to your server error logs for more information
    – DanCarlyon
    May 14, 2018 at 14:48
  • @DanCarlyon I was trying to update the logo of transactional emails May 14, 2018 at 14:48

2 Answers 2

1

The error says it: your cache folder is not writable.

Make sure the folder /var/www/vhosts/domain/httpdocs/var/cache/ is writable:

sudo chmod a+w /var/www/vhosts/domain/httpdocs/var/cache/

1

Based on your updated question it seems your permissions are incorrect on your var/cache directory.

Make sure they are correct and have read-write permissions.

If you have ssh access you can do this with

chmod 777 /var/www/vhosts/domain/httpdocs/var/cache/

Update:

The below command will set all directories to 770 and all files to 660

sudo find . -type d -exec chmod 770 {} \; && sudo find . -type f -exec chmod 660 {} \; && sudo chmod u+x bin/magento

You can see more about this on the magento devdocs

2
  • I tried it but nothing changed May 14, 2018 at 14:58
  • Best bet would be to re-check the server error logs as there may be another directory that has incorrect permissions, eg generation.
    – DanCarlyon
    May 15, 2018 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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