pdf - Creating a long TCPDF document without timeout (so long running php process) -
i'm building feature of site generate pdf (using tcpdf) booklet of 500+ pages. layout simple due number of records think qualifies "long running php process". need done handful of times per year , if have run in background , email admin when done, perfect. considered cron user-generated type of feature.
what can keep pdf rendering long takes? "good" php not *nix. tutorial link helpful.
what need change allowed maximum execution time php scripts. can several means script (you should prefer if work) or changing php.ini.
beware - changing execution time might lower performance of server. script allowed run time (30sec default) before terminated parser. helps prevent poorly written scripts tying server. should know doing before this.
you can find more info about:
- setting
max-execution-time
in php.ini here http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time - limiting maximum execution time
set_time_limit()
here http://php.net/manual/en/function.set-time-limit.php
ps: should work if use php generate pdf. not work if use stuff outside of script (called exec()
, system()
, similar).
Comments
Post a Comment