首頁 > 後端開發 > php教程 > 安裝magento之後提示:HTTP ERROR 500,請問怎麼解決?

安裝magento之後提示:HTTP ERROR 500,請問怎麼解決?

不言
發布: 2023-03-01 08:30:01
原創
3546 人瀏覽過


我在ubuntu14上安裝了magento2,網頁訪問http://localhost/能夠顯示apache的提示It Work! ,但是http://localhost/magento2/提示HTTP ERROR 500
我是使用以下的命令安裝的:

apt-get update
apt-get install git wget
wget -O /usr/local/bin/composer http://getcomposer.org/composer.phar
chmod +x /usr/local/bin/composer
cd /var/www
git clone https://github.com/magento/magento2.git
cd /var/www/magento2
composer install
登入後複製

出錯之後,我查了php的錯誤日誌,提示如下:

[Thu Sep 08 11:03 :34.275419 2016] [:error] [pid 2214] [client 127.0.0.1:41732] PHP Fatal error:  Uncaught exception 'MagentoFrameworkExceptionFileSystemException:  Uncaught exception 'MagentoFrameworkExceptionFileSystemException'rate message 'The filefile" be deleted Warning!unlink(/var/www/html/magento2/var/.regenerate): Permission denied' in /var/www/html/magento2/vendor/magento/framework/Filesystem/Driver/File.php:382nStack trace :n#0 /var/www/html/magento2/vendor/magento/framework/Filesystem/Directory/Write.php(173): MagentoFrameworkFilesystemDriverFile->deleteFile('/var/www/html/m...')n #1 /var/www/html/magento2/vendor/magento/framework/Code/GeneratedFiles.php(98): MagentoFrameworkFilesystemDirectoryWrite->delete('/var/.regenerat...')n#2 /var/www/ html/magento2/vendor/magento/framework/App/ObjectManagerFactory.php(114): MagentoFrameworkCodeGeneratedFiles->cleanGeneratedFiles()n#3 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(385 ): MagentoFrameworkAppObjectManagerFactory->create(Array)n#4 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(362): MagentoFrameworkAppBootstra in /var/www/html/magento2/vendor/magento /framework/Filesystem/Driver/File.php on line 382

請問這個狀況該如何解決?能讓我正常安裝magento

回覆內容:

我在ubuntu14上安裝了magento2,網頁造訪http://localhost/能夠顯示apache的提示It Work! ,但是http://localhost/magento2/提示HTTP ERROR 500
我是使用以下的命令安裝的:

apt-get update
apt-get install git wget
wget -O /usr/local/bin/composer http://getcomposer.org/composer.phar
chmod +x /usr/local/bin/composer
cd /var/www
git clone https://github.com/magento/magento2.git
cd /var/www/magento2
composer install
登入後複製

出錯之後,我查了php的錯誤日誌,提示如下:

[Thu Sep 08 11:03 :34.275419 2016] [:error] [pid 2214] [client 127.0.0.1:41732] PHP Fatal error:  Uncaught exception 'MagentoFrameworkExceptionFileSystemException:  Uncaught exception 'MagentoFrameworkExceptionFileSystemException'rate message 'The filefile" be deleted Warning!unlink(/var/www/html/magento2/var/.regenerate): Permission denied' in /var/www/html/magento2/vendor/magento/framework/Filesystem/Driver/File.php:382nStack trace :n#0 /var/www/html/magento2/vendor/magento/framework/Filesystem/Directory/Write.php(173): MagentoFrameworkFilesystemDriverFile->deleteFile('/var/www/html/m...')n #1 /var/www/html/magento2/vendor/magento/framework/Code/GeneratedFiles.php(98): MagentoFrameworkFilesystemDirectoryWrite->delete('/var/.regenerat...')n#2 /var/www/ html/magento2/vendor/magento/framework/App/ObjectManagerFactory.php(114): MagentoFrameworkCodeGeneratedFiles->cleanGeneratedFiles()n#3 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(385 ): MagentoFrameworkAppObjectManagerFactory->create(Array)n#4 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(362): MagentoFrameworkAppBootstra in /var/www/html/magento2/vendor/magento /framework/Filesystem/Driver/File.php on line 382

請問這個狀況該如何解決?能讓我正常安裝magento

直接官網下安裝包試試

Permission denied

權限不足,要確保./var目錄可寫,最好是專案所在目錄的owner都屬於apache
chown -R apache: apache ./

相關標籤:
php
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
作者最新文章
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板