|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38654 stream functions seem not affected by stream_context_create()
Submitted: 2006-08-30 10:48 UTC Modified: 2006-09-01 12:58 UTC
From: tjerk dot meesters at gmail dot com Assigned:
Status: Closed Package: Streams related
PHP Version: 5.1.5 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: tjerk dot meesters at gmail dot com
New email:
PHP Version: OS:


 [2006-08-30 10:48 UTC] tjerk dot meesters at gmail dot com
When file_get_contents() is used in combination with stream_context_create() not all wrapper options are taken into consideration.

Tested PHP versions on Linux:
5.1.5 - not working
5.1.1 - working
5.0.4 - working

This bug doesn't seems to appear on Windows platforms:
5.1.5 - working

Reproduce code:

// this code will perform a POST request to a URL with this code:
// print_r($_POST)

echo file_get_contents("",null,stream_context_create(array(
        'http' => array(
                'method' => 'POST',
                'content' => 'cmd=_notify-validate',
                'header' => 'Content-Type: application/x-www-form-urlencoded',


Expected result:
    [cmd] => _notify-validate

The meta information:
CONTENT_TYPE: application/x-www-form-urlencoded

Actual result:

The meta information:
HTTP_USER_AGENT: PHP/5.1.5 <-- this didnt't appear anywhere else
CONTENT_TYPE: application/x-www-form-urlencoded


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-30 11:00 UTC]
Please try using this CVS snapshot:
For Windows:

Can't reproduce with both 5.1.5 and 5.2-CVS.
 [2006-08-30 15:05 UTC] tjerk dot meesters at gmail dot com
updated summary ...
 [2006-08-30 15:17 UTC]
Still not reproducible.
 [2006-08-31 11:50 UTC] tjerk dot meesters at gmail dot com
Bug still present in 5.1.6, but it seems to be resolved in 5.2.0RC3-dev
 [2006-09-01 12:58 UTC]
5.2.0 is the next release.
Fixed -> closed.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 02:01:30 2024 UTC