Bug #72747 [NEW]: libxml_set_external_entity_loader doesn't work with httpd

From: Date: Wed, 03 Aug 2016 16:11:56 +0000
Subject: Bug #72747 [NEW]: libxml_set_external_entity_loader doesn't work with httpd
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202887@lists.php.net to get a copy of this message
From:             somewheremylove dot nh87 at gmail dot com
Operating system: Mac OS X 10.11/10.12
PHP version:      7.0.9
Package:          XML related
Bug Type:         Bug
Bug description:libxml_set_external_entity_loader doesn't work with httpd

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 bug report at https://bugs.php.net/bug.php?id=72747&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=72747&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=72747&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=72747&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=72747&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=72747&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=72747&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=72747&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=72747&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=72747&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=72747&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=72747&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=72747&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=72747&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72747&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=72747&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=72747&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=72747&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72747&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=72747&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=72747&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#202887) next »