Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

show error report only to me ?



1:53 pm on Feb 26, 2008 (gmt 0)

10+ Year Member


Is there a way to show the errror_report only to me ?
I meanmy host has it turned of which i dont mind..as i can turn it on ny adding php_flag display_errors on to my htaccess.

But if i turn it on everybody will see the errors and thats not nice to work with.
is there a way that it will only show to me as admin or to IP ?


2:21 pm on Feb 26, 2008 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

you could set display errors based on ip

something like

if ($_SERVER['REMOTE_ADDR'] == 'your ip here') {
ini_set('display_errors', '1');


2:37 pm on Feb 26, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Another idea, not so easy as jatar_k's, would be to use Firefox's UA cloaking add on. Create a custom UA string and serve errors if that string is found:

if ($_SERVER['HTTP_USER_AGENT'] == 'custom_user_agent') {
ini_set('display_errors', '1');

I find this works well when, say, three people are working on a site from different locations/ips. They can all work in 'dev mode' - so to speak.


3:09 pm on Feb 26, 2008 (gmt 0)

10+ Year Member

thanks guys, both ways are nice to play with .
Thank you :)

Featured Threads

Hot Threads This Week

Hot Threads This Month