Edit report at http://bugs.php.net/bug.php?id=54440&edit=1
ID: 54440 Patch added by: cataphr...@php.net Reported by: jpa...@php.net Summary: stream_context_set_default() should publish the default context to everybody Status: Open Type: Bug Package: Streams related Operating System: *nix PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: libxslt_54440.patch Revision: 1301869965 URL: http://bugs.php.net/patch-display.php?bug=54440&patch=libxslt_54440.patch&revision=1301869965 Previous Comments: ------------------------------------------------------------------------ [2011-04-01 11:45:40] jpa...@php.net See also #52926 ------------------------------------------------------------------------ [2011-04-01 11:43:32] jpa...@php.net Description: ------------ stream_context_set_default() doesn't publish the context to all PHP extension. Example is ext/libxml that doesn't recognize the context. Test script: --------------- stream_context_set_default(array('http'=>array('proxy'=>'my_proxy_url'))); $x = simplexml_load_file('http://some_resource'); Expected result: ---------------- The resource gets loaded through the HTTP proxy Actual result: -------------- The resource is not loaded through the HTTP proxy. For this to work, we have to use : $ctx = stream_context_create(array('http'=>array('proxy'=>'my_proxy_url'))); libxml_set_streams_context($ctx); // userland manual bind $x = simplexml_load_file('http://some_resource'); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54440&edit=1