Hello All,
We have upgraded to php 4.2.2 version from a previous version.
In the old version we used getenv("HTTP_HOST") to find out the host name and it worked well. But after the upgrade it is not giving any result to us. At the same time i am able to get the result with $_SERVER["HTTP_HOST"]. As i could not change all the previous code, I would like to get the value using getenv("HTTP_HOST") it self.
Here are the list of params from my php.ini file
register_globals = On
variables_order = "EGPCS"
gpc_order = "GPC"
Can some body tell me what went wrong ?
Thanks,
Rajesh B.
Global variables are not working
Moderator: General Moderators
When I do a phpinfo() on a test page, then search for HTTP_HOST, it only shows $_SERVER["HTTP_HOST"] as on option for getting the info that you need. However,
doing a getenv() as you did works on my box.
In my php.ini, the settings are
register_globals = Off
variables_order = "EGPCS"
gpc_order = "GPC"
Now if I change register_globals to On, it still works.
I'm going to look at a couple of other things.
Cheers,
BDKR
doing a getenv() as you did works on my box.
In my php.ini, the settings are
register_globals = Off
variables_order = "EGPCS"
gpc_order = "GPC"
Now if I change register_globals to On, it still works.
I'm going to look at a couple of other things.
Cheers,
BDKR
Hi,
Actually we were working with RedHatLinux 7.3 and PHP was working fine. we updated the server to 8.0 RedHatLinux and it automatically updated php to 4.2.2 . after that this getenv() function is not working.
It seems we are missing some configuration...
By the way .. what is ISAPI mode...please enlighten me..
Thanks
Rajesh B.
Actually we were working with RedHatLinux 7.3 and PHP was working fine. we updated the server to 8.0 RedHatLinux and it automatically updated php to 4.2.2 . after that this getenv() function is not working.
It seems we are missing some configuration...
By the way .. what is ISAPI mode...please enlighten me..
Thanks
Rajesh B.