Hi,

Monday, October 6, 2003, 4:43:20 AM, you wrote:
JW> I've been trying to make a simple script which just
JW> outputs the username that the script is currently
JW> executing under (in order to test that suexec is
JW> working properly).  I've tried using the following
JW> line:

JW> <?php print $_ENV['USER']; ?>

JW> and it fails to produce any output and returns the
JW> following error in my log file: "[Sun Oct  5 14:02:35
JW> 2003] [error] PHP Notice:  Undefined index:  USER in
JW> /home/test/test.php on line 1"

JW> Now, I've tried the same command on another server
JW> running PHP 4.2.0 and it correctly outputs the
JW> username as expected.  Both these machines are running
JW> Debian Linux.

JW> Now I figure it must be some configuration setting
JW> that is messing this up somehow, but I have no idea
JW> where to look.  I've checked out the documentation and
JW> it states that PHP versions later than 4.2.0 use the
JW> $_ENV global variable to access environment variables,
JW> so it seems like I'm using it correctly.  Anyways, if
JW> anyone has any suggestions, please let me know! 
JW> Thanks in advance,

JW> John Wilcox

JW> __________________________________
JW> Do you Yahoo!?
JW> The New Yahoo! Shopping - with improved product search
JW> http://shopping.yahoo.com

Do this to see what is available in your enviroment, it would seem that USER is
not being set by the system or is called something else.

echo `printenv`;

(use backticks)

-- 
regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to