[dev] Automatic error submission to administrative user
Chuck Hagenbuch
chuck at horde.org
Sun May 22 09:01:15 PDT 2005
Quoting Kevin Myer <kevin_myer at iu13.org>:
> differs from "standard" PEAR, etc.) These errors often threw on the page a
> dump of the various values, which were essentially a traceback, I'm
> assumingto
> aid debugging and which were very useful (and which I hope disappears in a
> release versions - all it takes is a misconfiguration and your database
> password or LDAP bind password are written to the screen [or you could just
> look at the Admin Setup screen too] ;) Drawback there is you don't want the
> Horde errors echoed to the screen, because they may have sensitive
> information.
The full backtrace is only displayed to people who pass Auth::isAdmin().
> So what I'm thinking would be extremely helpful (and maybe this
> already exists
> in HEAD but I haven't explored it fully) is to have an automated feedback
> mechanism, such that if an error is generated, the Horde/PEAR
> Notification/Error class can collect relevant information about what just
> occured - the PHP error, the user, browser, what they clicked on to generated
> the error, even machine statistics perhaps, like memory. Roll the
> idea of the
> existing Horde test.php scripts, a core dump, a Mozilla Talkback, a Windows
> Error Report, the mysqlbug script, the OpenBSD sendbug script and a Java
> exception log into one, stir, shake, and what falls out 9as relevant
> to a Horde install) would hopefully be a useful Horde bug report.
We could probably write a custom error handler that caught most PHP
errors (you can't catch fatal errors unfortunately, so those you're
stuck with) that collected most of this and called Horde::logMessage().
http://us2.php.net/set-error-handler
-chuck
--
"But she goes not abroad in search of monsters to destroy." - John
Quincy Adams
More information about the dev
mailing list