Question

I have automated my error_reporting process. Errors are logged to a file and periodically sent via email.

Problem is I don't get enough information. E.g. I can see a undefined index notice; but I can't see where it was triggered as often its an included file.

Is it possible to get a dump of $_SERVER in the error log?

Était-ce utile?

La solution

What I would do is to catch errors using this then log my custom error using this

Autres conseils

You can use function debug_backtrace

Function return backtrace for current position.

For Include $_SERVER to email you can use print_r($_SERVER, true); but I think this can help you little.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top