skip to Main Content

Magento 2.3 – CentOS 7 – page_cache is not writable

I am trying to installed Magento 2.3.4 in CentOS bases server. And getting below error: Fatal error: Uncaught Zend_Cache_Exception: cache_dir "/var/www/html/mage2/var/page_cache" is not writable in /var/www/html/mage2/vendor/magento/zendframework1/library/Zend/Cache.php:209 Stack trace: #0 /var/www/html/mage2/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180): Zend_Cache::throwException('cache_dir "/var...') #1 /var/www/html/mage2/vendor/colinmollenhour/cache-backend-file/File.php(87): Zend_Cache_Backend_File->setCacheDir('/var/www/html/m...') #2 /var/www/html/mage2/vendor/magento/zendframework1/library/Zend/Cache.php(153): Cm_Cache_Backend_File->__construct(Array) #3 /var/www/html/mage2/vendor/magento/zendframework1/library/Zend/Cache.php(94):…

VIEW QUESTION

How to get current product in block in Magento 2 without Register and Object Manager?

How to avoid using depricated Registry and prohibited Object Maneger to get current product? I have this code now: $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $product = $objectManager->get('MagentoFrameworkRegistry')->registry('current_product'); $product = $objectManager->create('NameModuleNameModelFolderProduct')->load($product->getId());

VIEW QUESTION
Back To Top
Search