Click to See Complete Forum and Search --> : PHP variables :: different results


towerboy
12-09-2005, 12:39 AM
Hi,
I am trying to get a testing server going on my local computer. I just got Apache/2.0.55 installed and PHP/5.1.1 installed. A test of phpinfo.php in the htdocs dir seems to work fine, but I am having a problem. I am trying to use this in a page of mine,
<?php print ('Your IP: '.$REMOTE_ADDR.''); ?>
All it renders is "your IP: "
On another server that I use, it works fine. The other server runs Apache/2.0.54 and PHP/5.0.4.

Can anyone give me a place to start looking to see why this is acting this way? Thanks.

Oh yea. The local computer is WinXPSP2. The other server is Fedora.

LiLcRaZyFuZzY
12-09-2005, 12:51 AM
<?php print ('Your IP: '.$_SERVER['REMOTE_ADDR'].''); ?>

towerboy
12-09-2005, 12:56 AM
OK, It works. Why the difference? Where can I find what other things will be different?

LiLcRaZyFuZzY
12-09-2005, 04:43 AM
it has to do with register_globals (http://www.php.net/manual/en/ini.core.php#ini.register-globals) being on or off

towerboy
12-09-2005, 09:24 AM
OK. I got it figured out now. Thanks for your help.

LiLcRaZyFuZzY
12-09-2005, 09:32 AM
you're welcome ;)