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

debug_backtrace( ) Risky? 1

Status
Not open for further replies.

thenewa2x

Programmer
Dec 10, 2002
349
US
I would like to print debug_backtrace( ) to the screen everytime an error occurs. I know how to do it but my question then becomes, is it safe? Would providing that kind of information allow a hacker to take a whack at the erroneous script?

---------------------------------------
TINSTAAFL, which is why I contribute.
 
I am of the opinion that no user should ever see anything but what you want him to see. A user does not need to see the debug_backtrace() output, so I recommend that you not show it to him.

However, there is nothing to stop you from outputting that data to a log file and printing an error message which includes a "click back and try again. If you get this error message a second time, email this page to..." error page. Your script could then output a time/date stamp that will lead you to the place in the logfile where the error ocurred.

You could also have the script email you the debug_backtrace() output directly.

But don't show that information to users.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Ok, thanks.

---------------------------------------
TINSTAAFL, which is why I contribute.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top