'Laravel page shows "This page isn’t working" instead of errors
My laravel project is standing on xampp on windows. Whenever I make a critical error (a typo for example) i should get an error, but instead I'm seeing "This page isn’t working" in google chrome.
I've seen similar problems, but I have no idea how to fix this on Windows.
I have APP_ENV=local
and APP_DEBUG=true
.
Solution 1:[1]
The error was caused, because I was using the wrong PHP version.
I had XAMPP installed with 7.2.5
PHP version and had to downgrade to 7.1.13
.
Solution 2:[2]
In your .env
file, make sure you set APP_DEBUG=true
APP_ENV=local
APP_DEBUG=true
Then run
php artisan config:cache
php artisan config:clear
Sometimes, after running these two commands, Laravel still not reading the env
configs, so what worked for me every time is to set the app to maintenance mode then set to live again.
php artisan down
then in few seconds, run php artisan up
.
another cause:
Make sure in your env config, there are no spaces, if you have a value with spaces make sure to enclose it with quotes (" ").
Solution 3:[3]
Turn on Laravel debug by change .env
file
APP_DEBUG=true
or in config -> app.php
change this line:
'debug' => env('APP_DEBUG', true),
And finally, clear laravel cache :
php artisan config:cache
Hope this helpfull
Solution 4:[4]
This error is because the server ran out of memory (Allowed memory size of X bytes exhausted) before it could return an error. Try increasing your memory in php.ini
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Eternal |
Solution 2 | |
Solution 3 | Truong Dang |
Solution 4 | Darragh Blake |