PHP / MySQL debugging ?

I use the following statement to identify who has logged into a MySQL database on a server at my ISP. The statement works as intended when the code is executed at my ISP.

line 124 $user_name = trim($_SERVER['PHP_AUTH_USER']);

When I attempt to debug additional modifications to the code using Zend Studio, I get the following error:

Undefined index: PHP_AUTH_USER in C:\Program Files\Apache Group\Apache2\test\Web Site Version of Files\bhm_record_edit.php on line 124

One thought is that Zend is looking for a user on my computer rather than on the server at my ISP. Is there a way to tell my local debugger to look at my ISP rather then looking locally? It is not clear that I can install the Zend Debugger at my ISP.

Note: The debugging features seem to work extremely well for the rest of the program.

Thanks for any help you can offer.

Bob Holmström

Debugging

To debug in this way you need an extension added to the php engine (the zend debugger in this case). So to debug code on the server, you would need the debugger extension added to that server (something very few ISP's would ever do)
"Undefined index: PHP_AUTH_USER" just means that at that point the $_SERVER array does not have a key of 'PHP_AUTH_USER' defined. Try a print_r($_SERVER);exit; on line 123 of your code to confirm this.

Debugging

Thanks for your comments - I confirmed that the $_SERVER array does not have the key 'PHP_AUTH_USER' defined.

As a work around, I have just inserted a temporary $user in the code.

Bob