Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

html2pdf, tcpdf err...
 
Notifications
Clear all

html2pdf, tcpdf error on line 10420 (allowed memory size...)

6 Posts
3 Users
0 Reactions
11.1 K Views
(@nh2501)
Posts: 3
Active Member
Topic starter
 
[#413]

Hi,

We use, or rather try and test, Project'Or for some time, but we cannot solve error related to PDF generator (first in 1.8.3, now in 2.0.1).

All tries end with below error message:
Fatal error: Allowed memory size of 10485760 bytes exhausted (tried to allocate 491520 bytes) in /usr/home/[...]/projector/external/html2pdf/_tcpdf_5.0.002/tcpdf.php on line 10420

I Googled it and tried to increase memory size for PHP from Apache (httpd) level. When no results, I asked my WWW provider to increased. They tried it few times, ending with 512MB allocation, but nothing changed.

Is anyone encountered the same error in the past?

Thanks for any ideas,
Hubert Bartkowiak
Kosmonauta.net


 
Posted : 14 Mar 2012 14H47
Klaus
(@climb4fun)
Posts: 449
Contributor
 

Hello Hubert,
we have same issue due to enviromental constraints. We solve it by printing on PDF creator tool.
Klaus


 
Posted : 14 Mar 2012 15H52
(@nh2501)
Posts: 3
Active Member
Topic starter
 

Hello Hubert,
we have same issue due to enviromental constraints. We solve it by printing on PDF creator tool.
Klaus

Thx for your replay.
I see. But what constraints trigger that?
How to forward report to PDF printer in Project'or?


 
Posted : 14 Mar 2012 16H21
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

You should try and udate php.ini :

memory_limit = 10M  ; Maximum amount of memory a script may consume (10MB)

with

memory_limit = 512M  ; Maximum amount of memory a script may consume (512MB)

Your log show limit is 10M per script. This is clearly not enough for PDF transformation.
Take care with pdf transformation as is is much merory consuming.
It easily can lead to server fall (that is why server limits are generally low).

Klaus workaround is a very good hint :
- install PDF Creator (free)
- print your report (instead of exporting to PDF) and select the PDF Creator printer as target printer.
That's all.


 
Posted : 14 Mar 2012 16H59
(@nh2501)
Posts: 3
Active Member
Topic starter
 

You should try and udate php.ini :

But isn't the thing my server support has (tried?) to do? AFAIK I don't have access to php.ini file.

Thanks for printing tips - now it's quite obvious 🙂


 
Posted : 14 Mar 2012 22H04
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

You can also update $paramMemoryLimitForPDF parameter.
But by default it is set to 512, so it seems you don't have sufficient privilege to overwriting server defaut.


 
Posted : 14 Mar 2012 23H14
Share:

Scroll to Top