php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14885 PHP Variables is not supportted
Submitted: 2002-01-06 05:13 UTC Modified: 2002-05-24 20:32 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: r99t at hotmail dot com Assigned:
Status: Not a bug Package: iPlanet related
PHP Version: 4.0.5 OS: Solaris 7
Private report: No CVE-ID: None
 [2002-01-06 05:13 UTC] r99t at hotmail dot com
I tested with iPlanet 6.0 and PHP4.0.4pl1.
I also was did it with iPlanet 4.1 before, but the result was the same one.

After i compile and install the program, i opened file, test.php including the following line. 
<?
phpinfo();
?>

"PHP Variables", like this.. only two lines...

PHP_SELF /test.php 
HTTP_SERVER_VARS["QUERY_STRING"] 

The problem is NOT here.

The Variables are not work in the real php code.

echo $HTTP_SERVER_VARS["SERVER_NAME"];

Although $HTTP_SERVER_VARS["REMOTE_ADDR"] is work well,
Why isn't work $HTTP_SERVER_VARS["SERVER_NAME"], $HTTP_SERVER_VARS["REMOTE_PORT"].. etc ?

In Linux Box with apache, it works very well.

The following is the sample.

PHP Variables : value  (null values show that it does not work)

-------------------phpvar.php--------------------
PHP_SELF: /phpvar.php 
DOCUMENT_ROOT: 
force-response-1_0: 
HTTP_ACCEPT: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */* 
HTTP_CONNECTION: 
HTTP_HOST: 
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461) 
PATH: 
REMOTE_ADDR: 211.236.72.46 
REMOTE_PORT: 
SCRIPT_FILENAME: 
SERVER_ADDR: 
SERVER_ADMIN: 
SERVER_NAME: 
SERVER_PORT: 
SERVER_SIGNATURE: 
SERVER_SOFTWARE: 
GATEWAY_INTERFACE: 
SERVER_PROTOCOL: 
REQUEST_METHOD: GET 
QUERY_STRING: 
REQUEST_URI: 
SCRIPT_NAME: /xxx.php 
PATH_TRANSLATED: 
PHP_SELF: /phpvar.php 
argv: Array 
argc: 0 
PWD: 
HOSTNAME: 
LESSOPEN: 
USER: 
LS_COLORS: 
MACHTYPE: 
MAIL /var/mail/root 
INPUTRC 
BASH_ENV: 
LANG: ko 
LOGNAME: root 
SHLVL: 
SHELL: /sbin/sh 
USERNAME 
HOSTTYPE: 
OSTYPE: 
HISTSIZE: 
TERM: vt100 
HOME: / 
PATH: /usr/iplanet/servers/bin/https/bin:/opt/SUNWspro/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/ucb:/etc:.:/usr/local/bin:/usr/sbin:/



 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-06 05:18 UTC] r99t at hotmail dot com
I tested with iPlanet 6.0 and PHP4.0.4pl1.
I also did it with iPlanet 4.1 before, but the result was the same one.

After i compile and install the program, i executed file, test.php including the following line. 

<?
phpinfo();
?>

"PHP Variables", like this.. only two lines...

PHP_SELF /test.php 
HTTP_SERVER_VARS["QUERY_STRING"] 

The problem is NOT here.

The Variables are not work in the real php code.

echo $HTTP_SERVER_VARS["SERVER_NAME"];

Although $HTTP_SERVER_VARS["REMOTE_ADDR"] is work well,
Why isn't work $HTTP_SERVER_VARS["SERVER_NAME"],
$HTTP_SERVER_VARS["REMOTE_PORT"].. etc ?

In Linux Box with apache, it works very well.

The following is the sample.

PHP Variables : value  (null values show that it does not work)

-------------------phpvar.php--------------------
PHP_SELF: /phpvar.php 
DOCUMENT_ROOT: 
force-response-1_0: 
HTTP_ACCEPT: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */* 
HTTP_CONNECTION: 
HTTP_HOST: 
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461) 
PATH: 
REMOTE_ADDR: 211.236.72.46 
REMOTE_PORT: 
SCRIPT_FILENAME: 
SERVER_ADDR: 
SERVER_ADMIN: 
SERVER_NAME: 
SERVER_PORT: 
SERVER_SIGNATURE: 
SERVER_SOFTWARE: 
GATEWAY_INTERFACE: 
SERVER_PROTOCOL: 
REQUEST_METHOD: GET 
QUERY_STRING: 
REQUEST_URI: 
SCRIPT_NAME: /phpvar.php 
PATH_TRANSLATED: 
PHP_SELF: /phpvar.php 
argv: Array 
argc: 0 
PWD: 
HOSTNAME: 
LESSOPEN: 
USER: 
LS_COLORS: 
MACHTYPE: 
MAIL /var/mail/root 
INPUTRC 
BASH_ENV: 
LANG: ko 
LOGNAME: root 
SHLVL: 
SHELL: /sbin/sh 
USERNAME 
HOSTTYPE: 
OSTYPE: 
HISTSIZE: 
TERM: vt100 
HOME: / 
PATH:
/usr/iplanet/servers/bin/https/bin:/opt/SUNWspro/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/ucb:/etc:.:/usr/local/bin:/usr/sbin:/




 [2002-05-24 20:32 UTC] derick@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC