Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.