From:             php at hm2k dot org
Operating system: 
PHP version:      5.3.1
PHP Bug Type:     Streams related
Bug description:  $http_response_header does not get populated by 
file_put_contents stream

Description:
------------
When using file_put_contents(), $http_response_header does not populate as
expected.

Reproduce code:
---------------
<?php
$file=tempnam('','');
$url='http://example.com/';
file_put_contents($file,$url);
var_dump($http_response_header);

Expected result:
----------------
array(9) {
  [0]=>
  string(15) "HTTP/1.1 200 OK"
  [1]=>
  string(35) "Date: Sat, 12 Apr 2008 17:30:38 GMT"
  [2]=>
  string(29) "Server: Apache/2.2.3 (CentOS)"
  [3]=>
  string(44) "Last-Modified: Tue, 15 Nov 2005 13:24:10 GMT"
  [4]=>
  string(27) "ETag: "280100-1b6-80bfd280""
  [5]=>
  string(20) "Accept-Ranges: bytes"
  [6]=>
  string(19) "Content-Length: 438"
  [7]=>
  string(17) "Connection: close"
  [8]=>
  string(38) "Content-Type: text/html; charset=UTF-8"
}

Actual result:
--------------
false

-- 
Edit bug report at http://bugs.php.net/?id=50347&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=50347&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=50347&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=50347&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=50347&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50347&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=50347&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=50347&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=50347&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=50347&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=50347&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=50347&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=50347&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=50347&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=50347&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=50347&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=50347&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=50347&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=50347&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=50347&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=50347&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=50347&r=mysqlcfg

Reply via email to