Jump to content

blank pages and error display


gabucknall

Recommended Posts

I am writing a database using php mysql. I have a page which works fine but if I add one extra query it just produces a blank page. I remember once that someone said I could put in some code at the start of the page and it would display any errors but can't remember the code!

 

Could someone let me have the code and does anyone have any suggestions as to why this blanking is happening?

 

Many thanks

Link to comment
https://forums.phpfreaks.com/topic/288970-blank-pages-and-error-display/
Share on other sites

Doing the error configuration at runtime doesn't help if the error happens before the script runs. This is not the case here, but you're likely to run into more errors in the future.

 

So the proper solution is to open your php.ini and fix your global configuration: display_errors must be On, error_reporting should be -1. Of course you only do this in your local test environment. On a live server, you log the errors, not display them.

 

Note, however, that PHP does not automatically display MySQL errors. If the query itself fails, then you will not see that by default. How to get the error message depends on the database extension you're using. As trq already said, your question is very vague.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.