Bug #72747 [Com]: libxml_set_external_entity_loader doesn't work with httpd
Edit report at https://bugs.php.net/bug.php?id=72747&edit=1
ID: 72747
Comment by: rick at abitdigital dot com
Reported by: somewheremylove dot nh87 at gmail dot com
Summary: libxml_set_external_entity_loader doesn't work with
httpd
Status: Open
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:
also affects php Version 7.0.6 and 7.0.8 on OSX 10.11.5
Previous Comments:
------------------------------------------------------------------------
[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
Thread (4 messages)