I understand that it is possible to alter the PHP error reporting level site-wide, but can I report a different error level to a particular client (IP address)?
+3
A:
Yes:
if ($_SERVER["HTTP_HOST"] == "my.ip.address")
error_reporting(my_custom_reporting_level);
if you want to display verbose error messages to an administrator, you might be better off with an authentication system though.
Pekka
2009-11-15 22:09:30
+1 for the word of caution. Most, if not all, of the $_SERVER vars can be spoofed.
Mike B
2009-11-15 22:15:56
A:
It is possible natively as of PHP 5.3: http://php.net/ini.sections
Before that, you can manage it in the Vhost apache configuration.
SetEnv php_directive value
Savageman
2009-11-15 22:11:05