#13962 [Bgs]: Problem with Environment Variables
| From: | thetaphi@php.net | Date: | Tue, 02 Sep 2003 23:24:45 +0000 |
| Subject: | #13962 [Bgs]: Problem with Environment Variables | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-47102@lists.php.net to get a copy of this message | ||
ID: 13962
Updated by: thetaphi@php.net
Reported By: wburnett at cyberenv dot net
Status: Bogus
Bug Type: iPlanet related
Operating System: Solaris 8
PHP Version: 4.0.6
New Comment:
Additionally: why do you see CGI-like variables from the admin server?
Answer: This is because you started the webserver process from the
admin server which runs the startup script of the webserver you wanted
to start as a cgi script (a cgi script inside of the admin server!!!).
This is why the environment of the started webserver has some CGI
environment variables in it, because it got started by a CGI.
You can test this by starting the webserver not from the administration
server. Use the unix command line as root and start it manually - you
will see there are no CGI-like environment variables.
In multithreaded webservers the only possibility to get the CGI
variables ist by using $_SERVER[]. Please change your scripts to use
that. $_ENV[]/getenv() is useless!
Previous Comments:
------------------------------------------------------------------------
[2003-09-02 10:28:32] thetaphi@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This behavior is exspected, because iPlanet is a multithreaded
webserver. You cannot use the environment to get CGI variables. Use
$_SERVER['HTTP_HOST'] etc.! $_ENV['HTTP_HOST']/getenv('HTTP_HOST')
will
get the environment of the webserver process. That's correct.
If you want to use register_globals on try setting the correct variable
order to get the server variables first!
------------------------------------------------------------------------
[2003-09-02 08:42:22] sniper@php.net
These variables are set to whatever iPlanet tells they are.
------------------------------------------------------------------------
[2003-09-01 23:26:02] sorry at nospam dot org
i have a similar problem w/ sun one iplanet 6 sp5 the http_host
variable has the iplanet's admin port strung to it. i think this is one
reason phpmyadmin isn't working for me... i'm on solaris 9 ad using php
4.3.3 w/ phpmyadmin 2.5.2 pl1
------------------------------------------------------------------------
[2002-10-16 01:00:08] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2002-09-30 20:47:04] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/13962
--
Edit this bug report at http://bugs.php.net/?id=13962&edit=1