php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73517 LineNr reports max at 65535 ... stays 65535
Submitted: 2016-11-14 19:31 UTC Modified: 2016-11-17 07:17 UTC
From: johan at cti-computers dot be Assigned: cmb (profile)
Status: Closed Package: Variables related
PHP Version: Next Minor Version OS: OS X El Capitan 10.11.6
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: johan at cti-computers dot be
New email:
PHP Version: OS:

 

 [2016-11-14 19:31 UTC] johan at cti-computers dot be
Description:
------------
---
From manual page: http://www.php.net/function.libxml-get-errors
---
When validating (xsd-schema) big XML ( > 10.000.000 lines )
> If errors are found in the XML on linenumbers above 65535,
the value for the next linenumbers stays at maximum value of 65535.

* using the function : libxml_display_error($error) 
* and reading the output for : $error->line;


PHP version 5.6.24

LIBXML Running on MAC ( with XAMPP 5-6-24.1 )
libXML Compiled Version	2.8.0
libXML Loaded Version	20800
libXML streams	enabled

Test script:
---------------
function libxml_display_errors() {
  $errors = libxml_get_errors();
  foreach ($errors as $error) {
    libxml_display_error($error);		
  }
  libxml_clear_errors();
}
function libxml_display_error($error)
{
   $_SESSION['rep_errcode'] = $error->code;
   $_SESSION['bme_linenr'] = "L ".(string)$error->line;
...
}
***************************************************
BUG = Linenr has max value 65535. 
All lines with errors are in the report, with correct linenr if this is < 65536. 

The other outputs are OK. No problems.
OK = $error->message;
OK = $error->code;

Expected result:
----------------
That the output for the linenumber doesn't stop at 65535.
 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-15 11:18 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2016-11-15 11:18 UTC] cmb@php.net
As of PHP 7.0.0 (and libxml >= 2.9.0) you can set
LIBXML_BIGLINES[1] to get the proper line numbers. Would that
solve the issue for you?

[1] <http://php.net/manual/en/libxml.constants.php>
 [2016-11-16 17:34 UTC] johan at cti-computers dot be
-Status: Feedback +Status: Assigned
 [2016-11-16 17:34 UTC] johan at cti-computers dot be
OK. XAMPP 7.0.9-2 is now installed. PHP7 is included , and also LIBXML2.8.0
Not 2.9.0     What to do next ?
Any help ?   Where to download, how to install on MAC OS 10.11.6   ?

Thanks
 [2016-11-16 18:37 UTC] cmb@php.net
-Status: Assigned +Status: Feedback
 [2016-11-16 18:37 UTC] cmb@php.net
> OK. XAMPP 7.0.9-2 is now installed. PHP7 is included , and also
> LIBXML2.8.0

The official PHP windows binaries[1] are built against at least
libxml 2.9.2 as of PHP 7.0.0. What distros do is not our concern.
I suggest you contact <https://community.apachefriends.org/f/>.

Also, this is no help-desk. Please use one of the support channels
listed on <http://php.net/support.php>. Thanks.

[1] <http://windows.php.net/download/>
 [2016-11-17 07:18 UTC] johan at cti-computers dot be
-Status: Feedback +Status: Closed
 [2016-11-17 07:18 UTC] johan at cti-computers dot be
OK. Thx for quick answers.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 07:01:24 2019 UTC