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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cmb@php.net
New email:
PHP Version: OS:

 

 [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: Sat Jan 25 16:01:26 2020 UTC