Bug #17662 Updated: getenv() Apache variables not available
| From: | edink@php.net | Date: | Sat, 13 Jul 2002 20:57:13 +0000 |
| Subject: | Bug #17662 Updated: getenv() Apache variables not available | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-14090@lists.php.net to get a copy of this message | ||
ID: 17662
Updated by: edink@php.net
Reported By: garth@cybernode.com
-Status: Open
+Status: Feedback
Bug Type: Apache2 related
Operating System: SuSE 7.2
PHP Version: 4.2.1
New Comment:
Please try http://snaps.php.net/php4-STABLE-latest.tar.gz.
Could you
also please provide php related directives from your httpd.conf?
Previous Comments:
------------------------------------------------------------------------
[2002-06-27 03:18:57] garth@cybernode.com
Yes but the behavior can be overridden with
register_globals = on in php.ini. I used the same php.ini
for both my production 1.3.2x apache binary and the 2.0.x
apache binary.
apache 1.3.2x = getenv(_ANYTHING_) = works.
apache 2.0.3x = getenv(_ANYTHING_) = no worky.
i hope this is clearer.
------------------------------------------------------------------------
[2002-06-26 15:34:26] sniper@php.net
oops..meant to leave it open still..
------------------------------------------------------------------------
[2002-06-26 15:33:46] sniper@php.net
In PHP 4.2.0, the 'register_globals' setting default changed to
be off. See http://www.php.net/release_4_2_0.php
for more info.
We are sorry about the inconvenience, but this change was a necessary
part of our efforts to make PHP scripting more secure and portable.
------------------------------------------------------------------------
[2002-06-26 13:06:18] nataniel@implix.com
I have the same problem with PHP 4.2.1 and Apache 2.0.39. GetEnv() is
not returning enything, i.e.:
<?=getenv("REMOTE_ADDR")?>
returns blank string, and
<?=$REMOTE_ADDR?>
returns proper IP.
In closing of the Bug #12691 you wrote:
> I don't have problem with CVS version.
> Reopen if you have problem still with CVS version
As you can see, there is 4.2.1 and this problem is still happening :-(.
Of course everything is ok for Apache 1.3.
------------------------------------------------------------------------
[2002-06-09 02:05:06] garth@cybernode.com
This seems to be related to Closed Bug #12691
Just compiled Apache 2.0.36 and PHP 4.2.1. getenv(_ANYTHING_) returns
nothing. Variables are set and available as $_SERVER[_ANYTHING_].
phpinfo() shows no section starting with 'Apache Environment'.
PHP 4.2.1 configuration line:
./configure --with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=/usr --enable-sysvshm --enable-sysvsem \
--enable-xml --enable-wddx \
--with-config-file-path=/etc/apache \
--with-regex=system --with-tsrm-pthreads --with-imap \
--with-ldap --with-gd=/usr/local/src/gd-1.8.4 \
--with-png-dir=/usr/local/src/libpng-1.2.2 \
--with-jpeg-dir=/usr/local/src/jpeg-6b --with-zlib \
--disable-debug --enable-track-vars \
--enable-magic-quotes --enable-bcmath \
--with-gettext --enable-ftp --with-db2 \
--with-curl=/usr/local/lib \
--withpfpro=shared,/usr/local/verisign/payflowpro/linux/lib \
--with-openssl=/usr/local/ssl
Apache 2.0.36 configuration line:
./configure --prefix=/usr/local/apache2 \
--with-ssl=/usr/local/ssl \
--with-mpm=prefork --with-program-name=httpsd \
--enable-modules="speling rewrite ssl so" \
--enable-mime-magic --enable-unique-id
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17662&edit=1