|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69753 libXMLError::file contains invalid URI
Submitted: 2015-06-03 13:47 UTC Modified: 2017-08-16 16:28 UTC
From: Assigned:
Status: Suspended Package: XML related
PHP Version: 5.6.9 OS: Windows
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:
19 + 6 = ?
Subscribe to this entry?

 [2015-06-03 13:47 UTC]
On Windows the file property of libXMLError objects contains file:
URIs. These are invalid for current versions of PHP (tested 5.6.9)
with current versions of libxml2 (tested 2.9.2). It worked as
expected with PHP 5.4.19 and libxml2 2.7.8.

This bug affects, for instance, the configure script of the PHP

I don't know if that's an issue with libxml2 or PHP's wrapper.

Test script:

$doc = new DomDocument();
// the file xml-error.xml is supposed to have at least one error
$errors = libxml_get_errors();


Expected result:
string(43) "file:///C:/Users/cmb/php/bugs/xml-error.xml"

Actual result:
string(41) "file:/C:/Users/cmb/php/bugs/xml-error.xml"


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-03 20:40 UTC]
-Status: Open +Status: Suspended -Assigned To: +Assigned To: cmb
 [2015-06-03 20:40 UTC]
I've found that the issue is caused by a regression in libxml2,
and filed a respective ticket:

I'm changing the status of this ticket to "suspended", until the
issue has been resolved upstream.
 [2015-06-03 21:12 UTC]
-Summary: libXMLError::file contains invalid URIs +Summary: libXMLError::file contains invalid URI
 [2015-06-08 11:28 UTC]
To not forget about it: there is a workaround for the related
issue when such broken file:/ URIs are used for PHP stream
wrappers[1], which should be removed when the bug has been
resolved upstream.

[1] <>
 [2017-08-16 16:28 UTC]
-Assigned To: cmb +Assigned To:
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Mar 01 02:01:23 2021 UTC