I've been trying to make a simple script which just outputs the username that the script is currently executing under (in order to test that suexec is working properly). I've tried using the following line:
<?php print $_ENV['USER']; ?>
and it fails to produce any output and returns the following error in my log file: "[Sun Oct 5 14:02:35 2003] [error] PHP Notice: Undefined index: USER in /home/test/test.php on line 1"
Now, I've tried the same command on another server running PHP 4.2.0 and it correctly outputs the username as expected. Both these machines are running Debian Linux.
Try echo "<pre>"; print_r($_ENV); echo "</pre>"; to see what information is available in the ENV array.
Are both servers running the same implementation of PHP? (CGI/SAPI, etc.)
-- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php