No error message is prompted after the Laravel project is configured on the virtual host in Apache.

Source: Internet
Author: User
First, in php. in ini, the error prompt is enabled. You can view phpinfo () to see that the error prompt is enabled. However, when I configure a virtual host for Laravel, in this Laravel project directory, we can see that it is Off. After querying the relevant information, we can see it on the right...

Firstphp.iniThe error prompt is enabled.phpinfo()You can see that the error message is enabled, but whenLaravelWhen configuring a VMLaravelUnder the project directory, check to find

We can see thatOffAfter querying the relevant informationOnIndicates thatphp.iniAlready configuredOnAt this timeOffIsLocal ValueAnd then query the information to say it is possible.htaccessThe configuration may be faulty. The following isLaravelDefault Configuration


      
   
            Options -MultiViews    
       RewriteEngine On    # Redirect Trailing Slashes If Not A Folder...    RewriteCond %{REQUEST_FILENAME} !-d    RewriteRule ^(.*)/$ /$1 [L,R=301]    # Handle Front Controller...    RewriteCond %{REQUEST_FILENAME} !-d    RewriteCond %{REQUEST_FILENAME} !-f    RewriteRule ^ index.php [L]    # Handle Authorization Header    RewriteCond %{HTTP:Authorization} .    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  

At the same time, if I usephp artisan serveYes. The error message is displayed.
Similar to this

Of course, I know the error above, but this is true after the virtual domain name is configured.

And when I am a non-LaravelProject configuration VM can display the error prompt normally, my

APP_ENV=localAPP_DEBUG=true

It is also enabled.
What is the cause?

Reply content:

Firstphp.iniThe error prompt is enabled.phpinfo()You can see that the error message is enabled, but whenLaravelWhen configuring a VMLaravelUnder the project directory, check to find

We can see thatOffAfter querying the relevant informationOnIndicates thatphp.iniAlready configuredOnAt this timeOffIsLocal ValueAnd then query the information to say it is possible.htaccessThe configuration may be faulty. The following isLaravelDefault Configuration


      
   
            Options -MultiViews    
       RewriteEngine On    # Redirect Trailing Slashes If Not A Folder...    RewriteCond %{REQUEST_FILENAME} !-d    RewriteRule ^(.*)/$ /$1 [L,R=301]    # Handle Front Controller...    RewriteCond %{REQUEST_FILENAME} !-d    RewriteCond %{REQUEST_FILENAME} !-f    RewriteRule ^ index.php [L]    # Handle Authorization Header    RewriteCond %{HTTP:Authorization} .    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  

At the same time, if I usephp artisan serveYes. The error message is displayed.
Similar to this

Of course, I know the error above, but this is true after the virtual domain name is configured.

And when I am a non-LaravelProject configuration VM can display the error prompt normally, my

APP_ENV=localAPP_DEBUG=true

It is also enabled.
What is the cause?

If it is linux, it may be caused by log file permissions.

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.