Edit report at https://bugs.php.net/bug.php?id=54440&edit=1
ID: 54440 Comment by: sh...@php.net Reported by: jpa...@php.net Summary: libxml extension ignores default context Status: Closed Type: Bug Package: Streams related Operating System: *nix PHP Version: 5.3.6 Assigned To: cataphract Block user comment: N Private report: N New Comment: Reproduced segfault on all 3 branches (debug build on amd64): /home/conf/php5.3/Zend/zend_hash.c(979) : ht=0x2de6a50 is already destroyed Please also look at: http://ci.qa.php.net/job/php-src-trunk-matrix- build/architecture=x86,os=linux-debian-6.0/lastCompletedBuild/testReport/php- src.ext.libxml/tests/004_phpt___libxml_set_streams_context__/ and http://ci.qa.php.net/job/php-src-trunk-matrix- build/architecture=x86,os=linux-debian-6.0/lastCompletedBuild/testReport/php- src.ext.libxml/tests/bug54440_phpt___Bug__54440__libxml_extension_ignores_defaul t _context/ Previous Comments: ------------------------------------------------------------------------ [2011-04-09 20:32:57] cataphr...@php.net Automatic comment from SVN on behalf of cataphract Revision: http://svn.php.net/viewvc/?view=revision&revision=310109 Log: - Fixed bug #54440: libxml extension ignores default context. ------------------------------------------------------------------------ [2011-04-04 00:36:28] cataphr...@php.net Obviously the patch wasn't meant to be attached here. Sorry. ------------------------------------------------------------------------ [2011-04-04 00:32:46] cataphr...@php.net 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 ------------------------------------------------------------------------ [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 https://bugs.php.net/bug.php?id=54440&edit=1