I'm trying to create an app on Laravel 4 beta but I can't debug it because it doesn't show any error, display_errors
is on, error_reporting
is E_ALL
and debug => true
(config/app.php
). When I try to do an error on public/index.php
it shows a parse error, but when I do it on the router it just shows a blank page (White screen of death). How can I fix this?
Thank you
Inside config folder open
app.php
Change
to
Following the good advice by @The Shift Exchange I looked at the error_log and indeed managed to solve to problem. it was simply a permissions issue:
Once I used
chmod
to apply less stringent permissions, all went back to normal.However, I'm not sure that it answers the OP's question, as he was getting a blank screen rather than a server error.
Just go to your
app/storage/logs
there logs oferror
available. Go to filename of today's date time and you will find latesterror
in your application.OR
Open
app/config/app.php
and change settingTo
OR
Go to
.env
file to your application and change the configuratuion@Matanya - have you looked at your server logs to see WHAT the error 500 actually is? It could be any number of things
@Aladin - white screen of death (WSOD) can be diagnosed in three ways with Laravel 4.
Option 1: Go to your Laravel logs (app/storage/logs) and see if the error is contained in there.
Option 2: Go to you PHP server logs, and look for the PHP error that is causing the WSOD
Option 3: Good old debugging skills - add a die('hello') command at the start of your routes file - then keep moving it deeper and deeper into your application until you no longer see the 'hello' message. Using this you will be able to narrow down the line that is causing your WSOD and fix the problem.
Maybe not on Laravel 4 this time, but on L5.2* I had similar issue:
I simply changed the ownership of the
storage/logs
directory towww-data
with:My
logs
directory now looks like:I had a problem with the white screen after installing a new laravel instance. I couldn't find anything in the logs because (eventually I found out) that the reason for the white screen was that app/storage wasn't writable.
In order to get an error message on the screen I added the following to the public/index.php
After that it was easy to solve the problem.