|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71497 DOMDocument::documentURI incorrect path converting
Submitted: 2016-02-02 08:36 UTC Modified: 2016-02-02 09:03 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: pvlgood at gmail dot com Assigned:
Status: Open Package: DOM XML related
PHP Version: 5.6.17 OS: Windows 8.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
2 + 49 = ?
Subscribe to this entry?

 [2016-02-02 08:36 UTC] pvlgood at gmail dot com
See code sample below

Test script:
$dd = new DOMDocument();
echo $dd->documentURI;
echo file_exists($dd->documentURI);


should be:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-02-02 09:03 UTC] pvlgood at gmail dot com
-Package: Doc Build problem +Package: DOM XML related
 [2016-02-02 09:03 UTC] pvlgood at gmail dot com
 [2016-02-04 14:46 UTC] eaton dot alf at gmail dot com
This is also a problem when trying to load an XML file with a DTD: the path to the DTD file in the XML catalog is parsed incorrectly (converting "file:///" to "file:/"), so the DTD can't be loaded (the error given is "failed to load external entity").

This may be a libxml2 bug, as it broke between libxml versions 1.9.1 and 1.9.2, although the xmllint command line tool is still able to correctly load the DTD.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Oct 01 16:01:24 2023 UTC