Re: Re[2]: [PHP-WIN] REMOTE_ADDR problem in CGI mode
| From: | Vince LaMonica | Date: | Fri, 01 Dec 2000 00:42:26 +0000 |
| Subject: | Re: Re[2]: [PHP-WIN] REMOTE_ADDR problem in CGI mode | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4212@lists.php.net to get a copy of this message | ||
On 2000-11-30, Pablo Vera stated:
Hi Pablo,
} My system: Apache 1.3.12, PHP 4.0.3pl1 (from www.php.net), Windows 98.
I've got 1.3.12, NT4sp5, and PHP 4.0.2 from php4win.de.
} I have PHP both, as CGI and module. CGI handles .cphp files, while
} the module handles .php, .php3 and .php4 files.
}
} At the end of my "httpd.conf" file I have:
[snip good conf ideas, which i adapted].
} I use two "php.ini" files, one located in "C:\Php4" (for the CGI) and
} the other located in "C:\Apache" (for the module). I do this because I
} need to load the GD library for the CGI, but not for the module.
I only use one php.ini file located in my C:\winnt dir, as I want to be
able to use all features on both the module and cgi.
} On both "php.ini" I have register_globals = On
I use a modified version of php-optimized.ini, so I have register_globals
= Off, hense why I use $HTTP_SERVER_VARS["REMOTE_ADDR"] [if i substitute
$GLOBALS for $HTTP_SERVER_VARS, I get an "undefined index" error no matter
if I'm using module or cgi].
} I don't have problems with REMOTE_ADDR, so I hope this helps.
Well, I'm definitely glad to hear that! :) I think it must be a config
issue on my end, as I can't get it to work even when I don't load the
module [i had thought the problem was due to me running both the cgi and
module at the same time, but it appears not to be the case, as i have ONLY
the cgi loaded and it is still failing].
I certainly don't remember changing anything with my local php.ini file,
though I guess I must have. :(
phpinfo() does report the correct value of REMOTE_ADDR - so now I'm really
confused!
Thanks for your tips - having a separate .conf file makes it easier to
manage [kinda like the apache 1.2.x days :) ].
/vjl/