After magento is installed, the following message is displayed: HTTPERROR500. how can this problem be solved?

Source: Internet
Author: User
Tags php error php error log magento2
I installed magento2 on ubuntu14. when I access localhost on the webpage, the apache prompt ItWork is displayed !, However, when localhostmagento2 prompts HTTPERROR500, I installed it with the following command: {code ...} after the error, I checked the php error... I installed magento2 on ubuntu14, and accessed http: // localhost/on the webpage to display the apache prompt It Work !, However, http: // localhost/magento2/prompts http error 500
I installed it with the following command:

apt-get updateapt-get install git wgetwget -O /usr/local/bin/composer http://getcomposer.org/composer.pharchmod +x /usr/local/bin/composercd /var/wwwgit clone https://github.com/magento/magento2.gitcd /var/www/magento2composer install

After an error occurs, I checked the php error log and the prompt is as follows:

[Thu Sep 11:03:34. 275419 2016] [: error] [pid 2214] [client 127.0.0.1: 41732] PHP Fatal error: uncaught exception 'magento \ Framework \ Exception \ filesystemexception' with message 'The file "/var/www/html/magento2/var /. regenerate "cannot be deleted Warning! Unlink (/var/www/html/magento2/var /. regenerate): Permission denied 'in/var/www/html/magento2/vendor/magento/framework/Filesystem/Driver/File. php: 382 nStack trace: n #0/var/www/html/magento2/vendor/magento/framework/Filesystem/Directory/Write. php (173): Magento \ Framework \ Filesystem \ Driver \ File-> deleteFile ('/var/www/html/m... ') n #1/var/www/html/magento2/vendor/magento/framework/Code/GeneratedFiles. php (98): Magento \ Framework \ Filesystem \ Directory \ Write-> delete ('/var /. regenerat... ') n #2/var/www/html/magento2/vendor/magento/framework/App/ObjectManagerFactory. php (114): Magento \ Framework \ Code \ GeneratedFiles-> cleanGeneratedFiles () n #3/var/www/html/magento2/vendor/magento/framework/App/Bootstrap. php (385): Magento \ Framework \ App \ ObjectManagerFactory-> create (Array) n #4/var/www/html/magento2/vendor/magento/framework/App/Bootstrap. php (362): Magento \ Framework \ App \ Bootstra in/var/www/html/magento2/vendor/magento/framework/Filesystem/Driver/File. php on line 382

How can this problem be solved? Allows me to install magento normally

Reply content:

I installed magento2 on ubuntu14, and accessed http: // localhost/on the webpage to display the apache prompt It Work !, However, http: // localhost/magento2/prompts http error 500
I installed it with the following command:

apt-get updateapt-get install git wgetwget -O /usr/local/bin/composer http://getcomposer.org/composer.pharchmod +x /usr/local/bin/composercd /var/wwwgit clone https://github.com/magento/magento2.gitcd /var/www/magento2composer install

After an error occurs, I checked the php error log and the prompt is as follows:

[Thu Sep 11:03:34. 275419 2016] [: error] [pid 2214] [client 127.0.0.1: 41732] PHP Fatal error: uncaught exception 'magento \ Framework \ Exception \ filesystemexception' with message 'The file "/var/www/html/magento2/var /. regenerate "cannot be deleted Warning! Unlink (/var/www/html/magento2/var /. regenerate): Permission denied 'in/var/www/html/magento2/vendor/magento/framework/Filesystem/Driver/File. php: 382 nStack trace: n #0/var/www/html/magento2/vendor/magento/framework/Filesystem/Directory/Write. php (173): Magento \ Framework \ Filesystem \ Driver \ File-> deleteFile ('/var/www/html/m... ') n #1/var/www/html/magento2/vendor/magento/framework/Code/GeneratedFiles. php (98): Magento \ Framework \ Filesystem \ Directory \ Write-> delete ('/var /. regenerat... ') n #2/var/www/html/magento2/vendor/magento/framework/App/ObjectManagerFactory. php (114): Magento \ Framework \ Code \ GeneratedFiles-> cleanGeneratedFiles () n #3/var/www/html/magento2/vendor/magento/framework/App/Bootstrap. php (385): Magento \ Framework \ App \ ObjectManagerFactory-> create (Array) n #4/var/www/html/magento2/vendor/magento/framework/App/Bootstrap. php (362): Magento \ Framework \ App \ Bootstra in/var/www/html/magento2/vendor/magento/framework/Filesystem/Driver/File. php on line 382

How can this problem be solved? Allows me to install magento normally

Try the installation package on the official website.

Permission denied

The permission is insufficient. make sure that the./var directory is writable. it is better that the owner of the project directory belongs to apache.
Chown-R apache: apache ./

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.