Re: [PHP] REMOTE_ADDR probs

2002-02-11 Thread Michael Sims

At 09:41 AM 2/11/2002 -0600, cyberskydive wrote:
$user = getenv('REMOTE_ADDR');
[...]
It works great on windows running apache php 4.0.1
but on solaris php 4.06 if I add a

print($first);

it returns the servers IP address, but everywhere else it returns the users
IP address.

On the Solaris machine, are you running PHP as an Apache module or as a CGI?

Check the output of phpinfo() on your solaris machine...see if using 
$HTTP_SERVER_VARS[REMOTE_ADDR] or $HTTP_ENV_VARS[REMOTE_ADDR] give you 
the expected results...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] REMOTE_ADDR probs

2002-02-11 Thread cyberskydive

I will try to call with the other meythodds you suggested and see what
happens.

I may have not been really clear.

on windows everythings working fine

on solaris it logs the IP address as the users/visitors (on a nother page)
but when using the code I included in my first post to check for a matching
IP, its returning the servers IP, thus searching the logged IP list for the
servers IP, instead of the users. So on one part of the site it works fine,
but on another it doesnt-lol


Michael Sims [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 At 09:41 AM 2/11/2002 -0600, cyberskydive wrote:
 $user = getenv('REMOTE_ADDR');
 [...]
 It works great on windows running apache php 4.0.1
 but on solaris php 4.06 if I add a
 
 print($first);
 
 it returns the servers IP address, but everywhere else it returns the
users
 IP address.

 On the Solaris machine, are you running PHP as an Apache module or as a
CGI?

 Check the output of phpinfo() on your solaris machine...see if using
 $HTTP_SERVER_VARS[REMOTE_ADDR] or $HTTP_ENV_VARS[REMOTE_ADDR] give you
 the expected results...




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php