Project

General

Profile

Task #1977

Getting PHP Warnings which loop and cause server to run out of memory

Added by Jerry Quinnell over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
Start date:
07/28/2021
Due date:
% Done:

0%

Estimated time:

Description

HI,

I'm running a PHP program printing out some PDF lines which works fine on my local server - Apache XAMPP v3.3.0 - PHP v 7.3.29 but when I run on our live 1&1 Server with same PHP and same error reporting msg levels (E_ALL) . I get 1/2 GIG of warning msgs and it eventually runs out of memory. Can you give me any advice on what/why it calls your tcpf_fonts.php at line 2002 ? and what for?

Why would it loop round thousands of times causing the warnings ?

Error_log entries which get repeated until the final out of memory line:-

[28-Jul-2021 15:19:17 Europe/Dublin] PHP Warning: array_map(): Expected parameter 2 to be an array, bool given in homepages/42/d267719562/htdocs/skyline/PDFvendor/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php on line 2002

[28-Jul-2021 15:19:17 Europe/Dublin] PHP Warning: array_merge(): Expected parameter 2 to be an array, null given in /homepages/42/d267719562/htdocs/skyline/PDFvendor/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php on line 2010

[28-Jul-2021 15:19:17 Europe/Dublin] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/42/d267719562/htdocs/skyline/PDFvendor/library/interpid/PdfLib/Multicell.php on line 505

[28-Jul-2021 15:19:44 Europe/Dublin] PHP Fatal error: Out of memory (allocated 849350656) (tried to allocate 20480 bytes) in /homepages/42/d267719562/htdocs/skyline/PDFvendor/library/interpid/PdfLib/Multicell.php on line 655

Could you advise where to start with this one ?

Many Thanks
Jerry

#1

Updated by Andrei Bintintan over 2 years ago

  • Status changed from New to Feedback
  • Assignee changed from Andrei Bintintan to Jerry Quinnell

Hi Jerry,

I cannot tell like this. Which version of the class are you using?

Are the provided examples working?

I think you should start with the first error maybe

library/interpid/PdfLib/Multicell.php on line 505

What is going on in /tcpdf_fonts.php its part of the tcpdf library, I am just using that.

#2

Updated by Jerry Quinnell over 2 years ago

Hi Andrei,

Ok thanks for the direction - I added an echo into your code and I narrowed it down to one character in my text that I was trying to print - when we print out the area of a house in (meteres squared) m2 - the 2 is in superscript. This single superscript char caused all the code to loop and run out of memory ..

Thats doesn't sound too correct ?!

Anyhow thanks for your help - I hope my small bug report helps you in someway ..

Rgds
Jerry

#3

Updated by Andrei Bintintan over 2 years ago

No that doesn't sound tooo correct. Please send me the text sample. Also the version of the class you're using.

#4

Updated by Andrei Bintintan over 2 years ago

  • Status changed from Feedback to Closed

Closed due to inactivity

Also available in: Atom PDF