【发布时间】:2017-01-18 06:12:23
【问题描述】:
您好,我正在尝试在我的 centos 操作系统中安装 magento 1.9.x 和 magento2。以下链接有助于在 centos 中配置 apache2.4、php7 和 mysql5.7。
在配置 web 服务器、php、mysql、magento 文件和所有文件之后。我为 magento2 创建数据库。基于上面的链接,我一个接一个地完成了所有步骤。在我在浏览器 localhost/magento2/ 中运行后
它在萤火虫和空白浏览器中显示 500 内部服务器错误。
我是centos和magento的初学者
请任何人帮助如何解决我过去两天所花费的这个问题。
Apache 错误日志:
[2016 年 9 月 10 日星期六 14:22:33.728848] [:error] [pid 2809] [client ::1:45432] PHP 致命错误:未捕获 Zend_Cache_Exception:cache_dir “/var/www/html/magento2/var/page_cache”不可写入 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Cache.php:209\nStack 跟踪:\n#0 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180): Zend_Cache::throwException('cache_dir "/var...')\n#1 /var/www/html/magento2/vendor/colinmollenhour/cache-backend-file/File.php(87):
Zend_Cache_Backend_File->setCacheDir('/var/www/html/m...')\n#2 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Cache.php(153): Cm_Cache_Backend_File->__construct(Array)\n#3 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true)\n#4
/var/www/html/magento2/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php(158): Zend_Cache::factory('Magento\\Framewo...', 'Cm_Cache_Backen...', 数组,数组,真,真,真)\n#5 /var/www/html/magento2/lib/internal/Magento/Framework/App/Cache/Frontend 在 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Cache.php 在第 209 行
【问题讨论】:
-
该错误与Apache有关,不查看Apache日志是不可能知道的。刷新页面`localhost/magento2,检查 /var/log 文件夹并搜索 Apache 日志。此外,这个问题在 ServerFault 而不是 StackOverflow 中会更有意义。
-
@Marcs 我检查了 var/log 目录.. 我在里面找到了 httpd 文件夹,我看到 access_log 文件包含以下错误 ::1 - - [10/Sep/2016:11:12:05 + 0530] “GET /magento2/ HTTP/1.1” 500 - “-” “Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0”....
-
你需要查看error_log,查看apache文档中关于错误日志的文档:httpd.apache.org/docs/2.4/logs.html
-
[Sat Sep 10 14:22:33.728848 2016] [:error] [pid 2809] [client ::1:45432] PHP 致命错误:未捕获 Zend_Cache_Exception: cache_dir "/var/www/html /magento2/var/page_cache" 在 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Cache.php:209\n堆栈跟踪:\n#0 /var/www/html/ 中不可写magento2/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180): Zend_Cache::throwException('cache_dir "/var...')\n#1 /var/www/html/magento2 /vendor/colinmollenhour/cache-backend-file/File.php(87):
-
Zend_Cache_Backend_File->setCacheDir('/var/www/html/m...')\n#2 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/ Cache.php(153): Cm_Cache_Backend_File->__construct(Array)\n#3 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Cache.php(94): Zend_Cache::_makeBackend(' Cm_Cache_Backen...', 数组, true, true)\n#4
标签: magento installation centos7