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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 20:01:36 2025 UTC