php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33384 Problem with $_SERVER array
Submitted: 2005-06-17 16:30 UTC Modified: 2005-06-17 19:29 UTC
From: anoopk at poornam dot com Assigned:
Status: Not a bug Package: Servlet related
PHP Version: 4.3.11 OS: Linux - Redhat-9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: anoopk at poornam dot com
New email:
PHP Version: OS:

 

 [2005-06-17 16:30 UTC] anoopk at poornam dot com
Description:
------------
I'm using standalone Resin as the servlet container. When using PHP Servlet for php support in Resin, the global array $_SERVER seems to be empty.
I saw a similar bug in the bug system.
http://bugs.php.net/bug.php?id=16915

Since I'm not able to re-open the bug, I'm posting a new one.
I'm having the same issue with php-4.3.11. I tried the $HTTP_SERVER_VARS as suggested in the previous bug, but didn't succeed.

configure line is as follows :
'./configure' '--enable-cli' '--enable-sockets' '--enable-pcntl' '--enable-mime-magic' '--with-mysql' '--with-ldap' '--with-java=/usr/java/jdk1.5.0_03/' '--with-tsrm-pthreads' '--with-servlet'

Reproduce code:
---------------
<?
print_r($_SERVER);

print_r($HTTP_SERVER_VARS);
?>

Actual result:
--------------
Array
(
    [argv] => Array
        (
        )

    [argc] => 0
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-17 19:14 UTC] sniper@php.net
Of course there are no variables since the servlet SAPI doesn't register any. 
 [2005-06-17 19:29 UTC] anoopk at poornam dot com
So the php scripts which uses _SERVER variables(such as HTTP_REFERER, DOCUMENT_ROOT etc) won't work with PHP Servlet sapi. It will be very helpful if you can suggest any altenative for this.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Aug 12 03:01:27 2020 UTC