php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16577 PHP4 doesn't get any enviroment variables
Submitted: 2002-04-12 18:09 UTC Modified: 2002-04-24 01:02 UTC
From: dhwz at gmx dot net Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.0CVS-2002-04-1 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dhwz at gmx dot net
New email:
PHP Version: OS:

 

 [2002-04-12 18:09 UTC] dhwz at gmx dot net
me and some other friends of mine have tested
the latest apache2 + and newest php4 versions
an got the same problem.
php doesn't get any enviroment variables
for example REMOTE_ADDR oder some variables like 
www.foo.org?test=foo

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-12 18:12 UTC] sniper@php.net
In PHP 4.2.0 and above, register_globals defaults to OFF 
in php.ini. Please try setting it 'on' or use the new super
globals: $_ENV[], $_GET, $_SERVER..etc.

If this is not the case, reopen this bug report.

 [2002-04-12 18:53 UTC] dhwz at gmx dot net
setting register_globals is set to on and it doesn't work
and it also doesn't work with php4.1.2 with apache2filter from cvs and apache2
 [2002-04-12 19:07 UTC] dhwz at gmx dot net
i want to use apache2 and i wouldn't rewrite all my php scripts
 [2002-04-12 20:22 UTC] sniper@php.net
Works fine here with PHP 4.2.0RC3 and Apache 2.0.35.

--Jani

p.s. Try RC3 from http://www.php.net/~derick/

 [2002-04-20 09:12 UTC] arjan at webpower dot nl
Just installed PHP4.2.0RC4 as APXS with Apache2(.0.35) on My Mandrake 8.0 system.
Compiles just fine, works good, but like others mentioned, I do not see the Apache specific environment variables in phpinfo() (f.e: PATH_TRANSLATED is unavailable).

Apache 2 configure options:
./configure  --prefix=/usr/local/apache2 --enable-so

PHP4.2.0.RC4 configure options:
./configure --with-mysql=/usr --with--gsql --enable-xml --enable-wddx --enable-ftp --enable-sysvsem --enable-sysvshm --with-apxs2=/usr/local/apache2/bin/apxs --with-ttf=/usr/include --with-jpeg-dir=/usr --with-tiff-dir=/usr --with-zlib-dir=/usr --with-freetype-dir=/usr/local/src/freetype-2.0.4 --with-png-dir=/usr/local/src/libpng-1.2.0/ --with-gd=/usr/local/src/gd-2.0.1/ --enable-gd-native-tt --enable-gd-imgstrttf --enable-track-vars

What am I doing wrong, or is it a bug?

Regards,

Arjan Haverkamp
arjan@webpower.nl
 [2002-04-20 09:13 UTC] arjan at webpower dot nl
Typo: --with-gsql should be --with-pgsql of course.
 [2002-04-24 00:50 UTC] ard at waikato dot ac dot nz
Same problem with Apache-2.0.35, PHP-4.2.0.  phpinfo() shows this in the enviroment:

PWD /l/src/openssl-0.9.6d-beta1
HZ 100
HOSTNAME deleted :-)
MOZILLA_HOME /usr/lib/netscape
ignoreeof 10
LS_OPTIONS --color=auto -F -b -T 0 

There are *no* CGI-type variables at all.  They all appear in _SERVER[], and as a previous poster wrote, I'm not rewriting all my PHP.

So how do we get this bug reopened?

If a PHP developer contacts me I will allow them access to my cgi-bin/printenv and phpinfo().
 [2002-04-24 00:50 UTC] ard at waikato dot ac dot nz
Same problem with Apache-2.0.35, PHP-4.2.0.  phpinfo() shows this in the enviroment:

PWD /l/src/openssl-0.9.6d-beta1
HZ 100
HOSTNAME deleted :-)
MOZILLA_HOME /usr/lib/netscape
ignoreeof 10
LS_OPTIONS --color=auto -F -b -T 0 

There are *no* CGI-type variables at all.  They all appear in _SERVER[], and as a previous poster wrote, I'm not rewriting all my PHP.

So how do we get this bug reopened?

If a PHP developer contacts me I will allow them access to my cgi-bin/printenv and phpinfo().
 [2002-04-24 00:50 UTC] ard at waikato dot ac dot nz
Same problem with Apache-2.0.35, PHP-4.2.0.  phpinfo() shows this in the enviroment:

PWD /l/src/openssl-0.9.6d-beta1
HZ 100
HOSTNAME deleted :-)
MOZILLA_HOME /usr/lib/netscape
ignoreeof 10
LS_OPTIONS --color=auto -F -b -T 0 

There are *no* CGI-type variables at all.  They all appear in _SERVER[], and as a previous poster wrote, I'm not rewriting all my PHP.

So how do we get this bug reopened?

If a PHP developer contacts me I will allow them access to my cgi-bin/printenv and phpinfo().
 [2002-04-24 01:02 UTC] rasmus@php.net
First, why the heck are you using Apache 2
Stick with Apache 1.3.x until things stabilize.

Second, turn on register_globals in your php.ini file.

Third, stop spamming us with the same report over and over again.
 [2002-04-25 17:01 UTC] ard at waikato dot ac dot nz
Here are some things from my phpinfo().  In the "Configuration / PHP core" section:

register_globals On On
safe_mode Off Off
variables_order GPCS GPCS

After "Apache 2.0/Additional Modules (empty)/ Environment":

PWD/tmp/punch_it_in_over_and_over
HZ 100
MOZILLA_HOME /usr/lib/netscape

...and then the rest of root's environment at the moment it ran "apachectl startssl".  No server variables - they're all in _SERVER[].

I'm sorry my previous post arrived three times: that'll teach me for using Links which, no doubt, you guys don't.

There are obviously a few people suffering from this bug.  Is the PHP team's official line "Don't submit bug reports about Apache 2"?  You've stated that Apache 2 support is experimental, but unless you acknowledge that there is a bug here PHP will remain broken.  You say things will stabilise: well, we're trying to help you do that.  Saying "stick with Apache 1" to new developers is like saying "stick with Perl."

On Feb 15 in bug 12691 yohgaki@php.net spammed "This bug has been fixed in CVS."  Did that fix make it into 4.2?

I'll say it again:  if a PHP developer who actually cares wants to see this bug on a 2.0.35/4.2 server, they can contact me.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC