Did you leave register_globals set to off in your php.ini? If so, you need to declare your $_ENV superglobal variable at the beginning of your script (see the section in the php manual on register_globals and the superglobal arrays).
HTH Mike ----- Original Message ----- From: "TeWoei Poon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 23, 2002 2:04 PM Subject: [PHP-INST] weird problem... > Hey all, > > This is really weird. I've just upgraded the php > version from 4.0.5 to 4.2.1. I'm running Apache on > Windows 98. I've been following the installation > instructions... I've done the necessary changes to > httpd.conf > > LoadModule php4_module > C:/php.4.2.1/sapi/php4apache.dll > AddType application/x-httpd-php .php > > Move php4ts.dll to the C:/windows/system. Update the > php.ini at C:/windows with the php.ini-dist > > I'm able to run php when I restart the Apache web > server. HOWEVER, it doesn't seem to know variable like > HTTP_USER_AGENT. What did I do wrong? It has been > working fine before I upgraded the php version. > > Here is a simple php script (test1.php) > <?php > > if(strstr($HTTP_USER_AGENT,"MSIE")) { > echo "You are using Internet Explorer<br>"; > } else { > echo "Your HTTP_USER_AGENT is $HTTP_USER_AGENT<br>"; > } > ?> > In this case... I got "Your HTTP_USER_AGENT is" and > blank (eventhough, I'm using IE). > Here is another simple php script (test2.php) > <?php > > echo "You could not be logged in $user"; > > echo ".... $HTTP_USER_AGENT"; > > ?> > > I got "You could not be logged in ...." when I called > the script htt://127.0.0.1/tests/test2.php?user=twp > > Please advice. Thanks in advance. > > __________________________________________________ > Do You Yahoo!? > LAUNCH - Your Yahoo! Music Experience > http://launch.yahoo.com > > -- > PHP Install Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php