PHP blank page and no error.

Usually on the production server are error messages turned off.
So if your script generates an error and therefore terminates, nothing will be displayed.

For resolving this problem, just turn on error displaying while debugging this error:

ini_set('display_errors', true);

Note that this error reporting setting is not recommended, because is not safe to displaying innards of your web application to third parties.

I have once spent 1 hour of my life complaining (and binary searching) my error because of not knowing this information.
Recently, I forgot about this a spend this hour once again 🙂

I hope that this piece of information will save your time and your nerves too 🙂

Author: Peter Csiba

Software Engineer at Google

Leave a Reply

Your email address will not be published. Required fields are marked *