我在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 ./