|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60403 $_SERVER in embedded server under Windows is empty
Submitted: 2011-11-28 19:17 UTC Modified: 2011-11-30 16:34 UTC
From: keisial at gmail dot com Assigned:
Status: Not a bug Package: Built-in web server
PHP Version: 5.4SVN-2011-11-28 (snap) OS: Windows Vista
Private report: No CVE-ID: None
 [2011-11-28 19:17 UTC] keisial at gmail dot com
$_SERVER in embedded server under Windows is empty

A simple index.php



Run with the embedded server

 php -S

Under Windows (wrong):

array(0) {


Under Linux (expected behavior, $_SERVER is populated):

array(18) {


  string(12) "/tmp/PHP_5_4"


  string(9) ""


  string(5) "58298"


  string(35) "PHP 5.4.0RC3-dev Development Server"


  string(8) "HTTP/1.1"


  string(4) "8080"


  string(1) "/"


  string(3) "GET"


  string(10) "/index.php"


  string(22) "/tmp/PHP_5_4/index.php"


  string(10) "/index.php"


  string(23) "Wget/1.13.4 (linux-gnu)"


  string(3) "*/*"


  string(14) ""


  string(10) "Keep-Alive"




  array(0) {





Tested Windows version is the nightly php-5.4-nts-windows-vc9-x86-r319967

Tested Linux version is a checkout of r320088, branch PHP_5_4

(and it wasn't fixed on those revisions 121, they were to a different subtree: phpdoc, pecl, or pear)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-29 03:30 UTC]
-Status: Open +Status: Feedback
 [2011-11-29 03:30 UTC]
I can not reproduce this under windows 7, could you verify that you have the 
exactlly same script as you described?
 [2011-11-30 16:24 UTC] keisial at gmail dot com
-Status: Feedback +Status: Open
 [2011-11-30 16:24 UTC] keisial at gmail dot com
Nevermind. It was using a php.ini with variables_order = "GPC"

Sorry for the noise, Laruence.
 [2011-11-30 16:34 UTC]
-Status: Open +Status: Bogus
 [2011-11-30 16:34 UTC]
Closing as bogus.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 13:01:27 2024 UTC