Hi guys I am getting the following message, Does anyone know how to fix this. ( I don't have a backup)
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/tradesignletters/public_html/vendor/colinmollenhour/cache-backend-file/File.php on line 81
Fatal error: Uncaught Zend_Cache_Exception: cache_dir "/home/tradesignletters/public_html/var/page_cache" is not writable in /home/tradesignletters/public_html/vendor/magento/zendframework1/library/Zend/Cache.php:209 Stack trace: #0 /home/tradesignletters/public_html/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180): Zend_Cache::throwException('cache_dir "/hom...') #1 /home/tradesignletters/public_html/vendor/colinmollenhour/cache-backend-file/File.php(87): Zend_Cache_Backend_File->setCacheDir('/home/tradesign...') #2 /home/tradesignletters/public_html/vendor/magento/zendframework1/library/Zend/Cache.php(153): Cm_Cache_Backend_File->__construct(Array) #3 /home/tradesignletters/public_html/vendor/magento/zendframework1/library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true) #4 /home/tradesignletters/public_html/vendor/magento/framework/App/Cache/Frontend/Factory.php(154): Zend_Cache::factory('Magento\\Framewo...', 'Cm_Cache_Backen...', Array, Array, true, true, tru in /home/tradesignletters/public_html/vendor/magento/zendframework1/library/Zend/Cache.php on line 209
Here - you have permission issue for var/cache directory as it is not writable so.
do one thing , remove the below mention directories and run the commands , then you will able to logged in into magento admin panel.
1) rm -rf var/cache , rm -rf var/generation , rm -rf generated
2) php bin/magento setup:di:compile
3) then from the root directory you need to run commands -
find ./var -type d -exec chmod 777 {} \; // 777 permission for var folder
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
4) php bin/magento setup:static-content:deploy -f
5) php bin/magento cache:clean
6) php bin/magento cache:flush
for more details refer this link - https://magento.stackexchange.com/questions/91870/magento-2-folder-file-permissions
Then check it will works
hope it helps !
Hello @imran_hussain1
As shared exception, it seems you var/ directory is not writable so need to set permission for Var folder.
Please run below commands:
Sudo chmod -R 0777 var/ pub/ php bin/magento cache:flush Sudo chmod -R 0777 var/ pub/
Try again it should work
Hello @imran_hussain1,
The issue looks like permission issue on cache directory. Please run below command in Magento 2 root directory
chmod -Rf 0777 var/ pub/
Also check below standard magento 2 permission command
find . -type d -exec chmod 500 {} \; find . -type f -exec chmod 400 {} \; find var/ -type f -exec chmod 600 {} \; find media/ -type f -exec chmod 600 {} \; find var/ -type d -exec chmod 700 {} \; find media/ -type d -exec chmod 700 {} \;
--
If my answer is useful, please Accept as Solution & give Kudos