Error loading big reports in LSM - LabCollector

Search Knowledge Base by Keyword

Error loading big reports in LSM

You are here:
← All Topics

Error opening pdf reports in LSM: exception ‘Mpdf\MpdfException’ with message ‘The HTML code size is larger than pcre.backtrack_limit 1000000. You should use WriteHTML() with smaller string lengths.

The PHP function preg_replace() has a maximum string length it will parse (by default this is often about 100000 characters). Over this, PHP silently returns a null value. So long strings of code will be replaced by nothing!

You may be able to increase the value of pcre.backtrack_limit at runtime if your system allows. Modify the php.ini file as follows:

By default you have:

;PCRE library backtracking limit.
;http://php.net/pcre.backtrack-limit
;pcre.backtrack_limit=100000

To fix the error uncomment the last line (remove ; ) and we suggest to increase the limit to 5000000:

;PCRE library backtracking limit.
;http://php.net/pcre.backtrack-limit
pcre.backtrack_limit=5000000

Note: pcre.backtrack_limit is configurable from PHP ≥ 5.2.0