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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

code to display error

Status
Not open for further replies.

Fujiko

Programmer
Dec 23, 2001
63
0
0
PH
Hi guys, just a newbie on php... my php page shows me a blank page and i can't figure out where the error is. Do you know what code i should put to display error? i surely forgot that one... thanks in advance :)
 
I agree with MrBelfry -- it could very well be a logical error in your code.

I have a FAQ on debugging PHP: faq434-2999

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Actually, my guess is that you need to configure your php ini file to display errors. I recently setup an Apache hosting account with a hosting company and had this same problem. Whenever there was any kind of error in my code (which is like every other line!) I'd get a blank page in the browser -- no error message. I researched and found helpful information that led me to the solution. I had to enable error reporting in my php.ini file, then restart Apache.


Which led me to:
However, ini_set didn't do the trick for me. Instead, I had to open the php.ini file in an editor and change this line from Off to On:

display_errors = On

Once this line was changed, I restarted Apache, and walla--errors displayed in the browser! Ah, life is good.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top