2

Environment: shared hosting (LAMP), CiviCRM 5.18.2, Backdrop 1.14, PHP 7.2.23 When invoicing is enabled (pay later, no payment processor), event registration times out after confirmation screen is confirmed by user. No final confirmation/thank you screen shown, or email sent with pdf invoice. PDF extension selected in CPanel PHP Selector > Extensions though throws same error if not selected; PHP timeout extended to 120 seconds, though this does not seem to override host settings (cannot restart Apache after changing). Error message: "[09-Oct-2019 23:57:10 Europe/London] PHP Fatal error: Maximum execution time of 30 seconds exceeded in ~/modules/civicrm/vendor/dompdf/dompdf/src/FrameDecorator/Block.php on line 193" Any thoughts gratefully received. Disabling invoicing allows registration, and confirmation email sent with pdf invoice with no invoice number, just no contribution record or ability to generate copy invoice etc.

  • Update: host has increased PHP timeout to 300 sec. No improvement. – Steven James Oct 10 at 9:45
  • If you turn off the PDF option does it work as you'd expect? – Laryn - CEDC.org Oct 11 at 3:36
  • does it include any images with biz size? if yes, reduce image size into KB. – Sunil Pawar Oct 11 at 9:07
  • @Laryn-CEDC.org: 'automatically include invoice...' switch on Admin>CiviContribute>CiviContribute Component Settings makes no difference. Works as expected when 'Enable Tax and Invoicing' is NOT selected. – Steven James Oct 12 at 10:12
  • @SunilPawar: No graphics in pdf - CiviCRM invoice template only with Civi logo removed. – Steven James Oct 12 at 10:12
1

Generating a pdf can take a lot of memory and time. If you can turn of the PDF option, that should skip the problem, as Laryn suggested try to turn if off, at least to be sure it's the root problem.

But ff it really takes a lot of time (300 sec is a lot) it might be that you changed the layout of the pdf and/or include too many heavy things (like a huge heavy image for your logo?)

If you do need complex/heavy pdf, one workaround is to let civi delegate the hard work of generating that pdf to an external program. Check if your hosting provider can install wkhtmltopdf and under Admin/system settings/misc put the path of that program into "Path to wkhtmltopdf executable"

I use it for instances that need to generate loads of complex pdfs, the default civi way should work fine for "simple" pdf, it's likely you have something in your setting that is an issue (either faulty pdf layout if you customised it, non optimised images or something)

X+

  • I concur. I found that I was unable to generate almost all pdfs. Switching to wkhtmltopdf solved the problem for me in every instance. I haven't run into a downside. – Keith Nunn Oct 11 at 22:34
  • @Xavier - Thanks. I will see if host can install wkhtmltopdf for me. Thanks also to Keith Nunn – Steven James Oct 12 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.