Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie question: displaying line numbers of errors

Status
Not open for further replies.

myatia

Programmer
Joined
Nov 21, 2002
Messages
232
Whenever there's an error in my code, all I get is a blank page. How do I get a message to display that tells me the line number of the error and a description of it? I'm running PHP and Apache. Let me know if I need to give more info.

Thanks,

Misty
 
First, take a look at your php.ini setting for error_reporting. "E_ALL & ~E_NOTICE" is a good setting. If you change the setting, remember to restart Apache.

Second, make sure you aren't useing the "@" error-supression operator ( when you invoke functions.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
In addition to sleipnir214, check out in php.ini for "display_errors = On". When it is "off", errors are not showed (and should be loged to a error_log file when "log_errors=on").

Hope this help you.
 
I made the changes both of you suggested and the line numbers are showing up. Thanks for your help.

Misty
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top