php.net |  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: cmb@php.net 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:
MUST BE VALID
Solve the problem:
26 - 24 = ?
Subscribe to this entry?

 
 [2015-06-03 13:47 UTC] cmb@php.net
Description:
------------
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
documentation.

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

Test script:
---------------
<?php

libxml_use_internal_errors(true);
$doc = new DomDocument();
// the file xml-error.xml is supposed to have at least one error
$doc->load('xml-error.xml');
$errors = libxml_get_errors();
var_dump($errors[0]->file);

?>

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"

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-03 20:40 UTC] cmb@php.net
-Status: Open +Status: Suspended -Assigned To: +Assigned To: cmb
 [2015-06-03 20:40 UTC] cmb@php.net
I've found that the issue is caused by a regression in libxml2,
and filed a respective ticket:
<https://bugzilla.gnome.org/show_bug.cgi?id=750365>.

I'm changing the status of this ticket to "suspended", until the
issue has been resolved upstream.
 [2015-06-03 21:12 UTC] cmb@php.net
-Summary: libXMLError::file contains invalid URIs +Summary: libXMLError::file contains invalid URI
 [2015-06-08 11:28 UTC] cmb@php.net
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] <https://github.com/php/php-src/pull/1320#issuecomment-109894179>
 [2017-08-16 16:28 UTC] cmb@php.net
-Assigned To: cmb +Assigned To:
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Jul 09 12:01:29 2020 UTC