SOLVED Changing maximum execution time for PDF rendering

Hi,

I have a Fabrik list with around 2000 records, which contains a fair amount od elements (including lots of CALC elements). My goal it to have it whole rendered, so I can create a PDF in one go (so pagination is not an option here, is it). It's my internal server, which isn't reachable from WAN.

First I couldn't even display the whole list, so I set all the CALC elements to 'Calc on save', then heavily modified list template, so it only generates very generic table with no buttons, no classes - et voila, it renders quite decent.

But when I try to create PDF, all I get is:

Fatal error: Maximum execution time of 60 seconds exceeded...

Since it's my server, I've changed max_execution_time and max_input_time to 3600 in PHP .INI and no luck - still I get this '60 seconds' message. So I thought that maybe it's set somewhere in Fabrik code? Seriously, it can create that PDFs for hours if needed, I just want to have them generated.

Please help - what are my options?

Cheers, Olek
 
I think setting max_execution_time should do.

You can check in System Information/PHP settings if it has really changed.

But PDF rendering needs a lot more resources than the rendering on the screen and 2000 records is a lot.

One option may be to display your complete list with the reduced custom template and add &tmpl=component (so you'll get the pure list without Joomla stuff), then use ctrl-p and let your browser create the PDF.
 
I think setting max_execution_time should do.

Unfortunately it doesn't work, really. I've checked the whole Joomla system info and it shows actual settings of PHP.INI, where every option I could think of is set to some ridiculous value. And it still quits with that '60 seconds' message. My server is a bit of a beast (2 CPUs, 128 GB RAM), so I am really ready (and willing!) to give the PDF generator as much resources as possible, but cannot overcome these 60 seconds handbrake. I thought that maybe it's a browser thing, but no - Chrome and FF behave the same. I know that PHP scripts may have coded in max execution time, but I don't know if this is the case and where to even start looking for it, as Farbik is huge and complex beyond my comprehension.

And yes, I've tried that 'naked component' option, but I lose full control over PDF look (which dompdf gives me).

If there only was a way of getting rid of that stupid '60 seconds' obstacle...
 
Alight, I KINDA solved it. I was right about the handbrake: /components/com_fabrik/models/list.php

Line 700:

Code:
@set_time_limit(60);

I've changed to:

Code:
@set_time_limit(0);

... and it works. I know that modifying core files is a no no, so now I'm wondering if this file can be... overriden by template? Probably not. But since I'm in desperate mode, I have to stick to this very imperfect solution, I guess.
 
It's not forbidden to hack core files:) - as long as you know what you are doing (and as long as you remember to mention it in the forum)

No idea why it's "hardcoded", I assume it's from earlier times where 60 sec were an extension.
I was searching for 60 only in pdf related files and didn't find anything.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top