Bug #72747 [Opn->Csd]: libxml_set_external_entity_loader doesn't work with httpd

From: Date: Mon, 08 Aug 2016 08:49:36 +0000
Subject: Bug #72747 [Opn->Csd]: libxml_set_external_entity_loader doesn't work with httpd
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203056@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72747&edit=1 ID: 72747 User updated by: somewheremylove dot nh87 at gmail dot com Reported by: somewheremylove dot nh87 at gmail dot com Summary: libxml_set_external_entity_loader doesn't work with httpd -Status: Open +Status: Closed Type: Bug Package: XML related Operating System: Mac OS X 10.11/10.12 PHP Version: 7.0.9 Block user comment: N Private report: N New Comment: Rebuid httpd with --enable-mpms-shared=all and then add LoadModule mpm_prefork_module modules/mod_mpm_prefork.so into httpd.conf solved this. Previous Comments: ------------------------------------------------------------------------ [2016-08-03 17:37:25] rick at abitdigital dot com also affects php Version 7.0.6 and 7.0.8 on OSX 10.11.5 ------------------------------------------------------------------------ [2016-08-03 16:11:55] somewheremylove dot nh87 at gmail dot com Description: ------------ libxml_set_external_entity_loader doesn't work with httpd built from source. Example code from http://php.net/manual/en/function.libxml-set-external-entity-loader.php (Example 1) Test script: --------------- http://stackoverflow.com/questions/38683530/libxml-set-external-entity-loader-doesnt-work-in-httpd Expected result: ---------------- string(10) "-//FOO/BAR" string(25) "http://example.com/foobar" array(4) { ["directory"]=> NULL ["intSubName"]=> NULL ["extSubURI"]=> NULL ["extSubSystem"]=> NULL } bool(true) Actual result: -------------- Warning: DOMDocument::validate(http://example.com/foobar): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /www/test.php on line 28 Warning: DOMDocument::validate(): I/O warning : failed to load external entity "http://example.com/foobar" in /www/test.php on line 28 Warning: DOMDocument::validate(): Could not load the external subset "http://example.com/foobar" in /www/test.php on line 28 bool(false) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72747&edit=1

« previous php.bugs (#203056) next »