Re: weird problem...

From: Date: Thu, 23 May 2002 18:28:40 +0000
Subject: Re: weird problem...
References: 1 2  Groups: php.install 
Request: Send a blank email to php-install+get-7092@lists.php.net to get a copy of this message
Sorry, that should be $_SERVER superglobal NOT $_ENV ----- Original Message ----- From: "MikeParton" <mike.parton@nimblesdg.com> To: "TeWoei Poon" <twpoonus@yahoo.com>; <php-install@lists.php.net> Sent: Thursday, May 23, 2002 2:21 PM Subject: Re: [PHP-INST] weird problem... > 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" <twpoonus@yahoo.com> > To: <php-install@lists.php.net> > 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 > >

« previous php.install (#7092) next »