Autoglobals not on,use $_SERVER['{VAR}'] instead. .:Fran
-----Original Message----- From: Rich Gray [mailto:[EMAIL PROTECTED] Sent: 04 March 2003 10:41 To: Sharat Hegde; php-windows Subject: RE: [PHP-WIN] Retrieving Server and PHp variables > Hello, > > I just upgraded from PHP3 to PHP4 on Apache 1.3.x on Windows NT. I need to > access the PHP and SERVER variables on my PHP 4 installation. My > code is as > follows: > > <?php > echo $SERVER_SOFTWARE; > echo $PHP_SELF; > ?> > > However, I get the following error: > > Notice: Undefined variable: SERVER_SOFTWARE in c:\program files\apache > group\apache\htdocs\test\test1.php on line 2 > > Notice: Undefined variable: PHP_SELF in c:\program files\apache > group\apache\htdocs\test\test1.php on line 3 > > Also, one more thing I noticed was that <?php phpinfo(); ?> shows > the Server > and PHP variables fine. > > Can you help out? > > Thanks, > Sharat Sharat You will need to look up the superglobal array $_SERVER[] in the PHP manual - a lot has changed since php3! Try ... <? echo $_SERVER['SERVER_SOFTWARE'].' '.$_SERVER['PHP_SELF']; ?> HTH Rich -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Internet communications are not secure and therefore the Barclays Group does not accept legal responsibility for the contents of this message. Although the Barclays Group operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Barclays Group. Replies to this email may be monitored by the Barclays Group for operational or business reasons. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php