This is a discussion on How can i get the location of an exit()/die() from within register_shutdown_function()? within the PHP General forums, part of the PHP Programming Forums category; On Wed, Jul 16, 2008 at 1:53 PM, tedd <tedd.sperling@gmail.com> wrote: > At 9:...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Wed, Jul 16, 2008 at 1:53 PM, tedd <tedd.sperling@gmail.com> wrote:
> At 9:15 AM -0400 7/16/08, Eric Butera wrote: >> >> As an aside, if I were to see some jibberish about a query and line >> numbers when I click a link I'd leave that site. (And for the >> archives) It is a security vuln to show full file paths to an end >> user. If someone is tampering with your system we shouldn't give them >> any more information than they can already get. > > It can certainly help you for debugging, but I agree, it's not for > production. > > tedd I register an error handler & a shutdown function on new features so that I can get error reports via email. I hate trying to sift thru logs and junk so I really need it in my face. Of course this is a performance hit as it actually has to send emails and parse errors, but after I haven't got any mails in a while I turn it off. |
|
|||
|
At 2:18 PM -0400 7/16/08, Eric Butera wrote:
>On Wed, Jul 16, 2008 at 1:53 PM, tedd <tedd.sperling@gmail.com> wrote: >> At 9:15 AM -0400 7/16/08, Eric Butera wrote: >>> >>> As an aside, if I were to see some jibberish about a query and line >>> numbers when I click a link I'd leave that site. (And for the >>> archives) It is a security vuln to show full file paths to an end >>> user. If someone is tampering with your system we shouldn't give them >>> any more information than they can already get. >> >> It can certainly help you for debugging, but I agree, it's not for >> production. >> >> tedd > >I register an error handler & a shutdown function on new features so >that I can get error reports via email. I hate trying to sift thru >logs and junk so I really need it in my face. Of course this is a >performance hit as it actually has to send emails and parse errors, >but after I haven't got any mails in a while I turn it off. I don't really know how others debug, I work alone. But, I do all my stuff online and use the following function: function report($query, $line, $file) { echo($query . '<br>' .$line . '<br/>' . $file . '<br/>' . mysql_error()); } That gives me immediate notice of where the error occurred and what the error was. When I take my code to production, I simply comment out the echo(). I used to use a global to do that (show/not show errors), but consider all my error stuff in is one file, it's easy enough to comment out what I don't want to show. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com |