|  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.
Block user comment
Status: Assign to:
Bug Type:
From: anoopk at poornam dot com
New email:
PHP Version: OS:


 [2005-06-17 16:30 UTC] anoopk at poornam dot com
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.

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:


Actual result:
    [argv] => Array

    [argc] => 0


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-17 19:14 UTC]
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-2022 The PHP Group
All rights reserved.
Last updated: Sat Aug 20 02:03:41 2022 UTC