From:             ca533512 at tiscali dot cz
Operating system: Win2k SP4
PHP version:      5.0.1
PHP Bug Type:     Unknown/Other Function
Bug description:  headers_list() func. return empty array

Description:
------------
If I try code from PHP docs of headers_list() function, browser print only
empty array.

or this function is not available on win OS ?

Reproduce code:
---------------
/* setcookie() will add a response header on its own */
setcookie('foo', 'bar');
/* Define a custom response header
   This will be ignored by most clients */
header("X-Sample-Test: foo");
/* Specify plain text content in our response */
header('Content-type: text/plain');
/* What headers are going to be sent? */
var_dump(headers_list());



Expected result:
----------------
array(4) {
  [0]=>
  string(29) "X-Powered-By: PHP/5.0.0" // ... 5.0.1
  [1]=>
  string(19) "Set-Cookie: foo=bar"
  [2]=>
  string(18) "X-Sample-Test: foo"
  [3]=>
  string(24) "Content-type: text/plain"
}


Actual result:
--------------
array(0) {
}


-- 
Edit bug report at http://bugs.php.net/?id=29683&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29683&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29683&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29683&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29683&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29683&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29683&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29683&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29683&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29683&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29683&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29683&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29683&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29683&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29683&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29683&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29683&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29683&r=float

Reply via email to