HTTP_ENV_VARS + Cobalt RAQ3i
| From: | Andrew Smith | Date: | Sun, 23 Jul 2000 06:37:05 +0000 |
| Subject: | HTTP_ENV_VARS + Cobalt RAQ3i | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-7756@lists.php.net to get a copy of this message | ||
Hi All,
I'm using php4.0.1pl2 on a Cobalt RAQ3i and I'm having difficulties with
HTTP_ENV_VARS[]. I haven't used php4 on unix before, so I'm not sure if
this is specific to the RAQ or not, but the Apache Environment variables are
not listed in the Environment section of phpinfo() and do not get hashed in
HTTP_ENV_VARS[].
To further complicate things the RAQ seems to log (or do something with)
HTTP errors like 404 and so periodically there are a whole bunch of Apache
Environment variables registered in HTTP_ENV_VARS[] however these are
related to the virtual host which generated the error and not the current
virtual host, they're also short lived. So things like
HTTP_ENV_VARS["DOCUMENT_ROOT"] gives incorrect information or nothing at
all. From limited testing it appears that getenv gets the correct
DOCUMENT_ROOT even when HTTP_ENV_VARS["DOCUMENT_ROOT"] is returning an
incorrect one or is unset. Can anyone with a greater understanding of the
php internals clarify for me if I'm going to get the right answer
consistently from getenv()? Is there an order of precedence for env vars
and apache env vars?
Currently I'm moving a project which was developed on windows and relies
heavily on HTTP_ENV_VARS[]. Is there a way to force the Apache env vars to
be included in this hash and give them priority over any env vars of the
same name? This appears to be what happens on win32.
BTW I realise I can, but I'd rather not turn register_globals on
Thanks,
Andrew