/    Sign up×
Community /Pin to ProfileBookmark

PHP variables :: different results

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,

[code=php]<?php print (‘Your IP: ‘.$REMOTE_ADDR.”); ?>[/code]

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.

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYDec 09.2005 — [code=php]
<?php print ('Your IP: '.$_SERVER['REMOTE_ADDR'].''); ?>
[/code]
Copy linkTweet thisAlerts:
@towerboyauthorDec 09.2005 — OK, It works. Why the difference? Where can I find what other things will be different?
Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYDec 09.2005 — it has to do with [I][url=http://www.php.net/manual/en/ini.core.php#ini.register-globals]register_globals[/url][/I] being [B]on[/B] or [B]off[/B]
Copy linkTweet thisAlerts:
@towerboyauthorDec 09.2005 — OK. I got it figured out now. Thanks for your help.
Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYDec 09.2005 — you're welcome ?
×

Success!

Help @towerboy spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.8,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...