Forum Moderators: coopster

Message Too Old, No Replies

getenv() problem under redhat 8 with apache

Am I blind?

         

pontifex

3:32 pm on Jan 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i just got my new redhat 8 box online:
register globals is on
safe mode is off

but getenv() does not work. it looks like the
register globals directive is not accepted.

suggestions anyone? thx!
P!

PS: _ENV would work, but then I have to change the whole code :-(

coopster

9:18 pm on Jan 11, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



register globals
isn't an issue here, except for the fact that you have it ON [php.net]!

getenv() [php.net] expects exactly 1 parameter though. For example, you need to pass it something like this:


$ip = getenv("REMOTE_ADDR"); // get the ip number of the user

You can see a list of all the environmental variables by using phpinfo() [php.net]. You can find out what many of them mean by taking a look at the CGI specification [hoohoo.ncsa.uiuc.edu], specifically the page on environmental variables [hoohoo.ncsa.uiuc.edu].