Forum


Replies: 1   Views: 562
Timeout running doc from template
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 21-04-2023 - 18:19

Hello,

DOMPDF_lib.php is an internal class used to parse HTML/CSS contents by HTML methods (embedHTML and replaceVariableByHTML). It is updated each new release of phpdocx to support new HTML tags and CSS styles, and also other improvements.

A Fatal error: Maximum execution time is a PHP error that appears when a PHP script exceeds this PHP time setting. You can set an unlimited value in your PHP code:

ini_set('MAX_EXECUTION_TIME', '-1');
set_time_limit(0);

or in the PHP configuration.

On https://stackoverflow.com/questions/7680572/fatal-error-maximum-execution-time-of-300-seconds-exceeded you can read more information about this question.

In any case, we recommend you test it running PHP CLI mode, maybe you are transforming a huge HTML/CSS or there's any external blocking such as the database or a web service. Although huge HTML/CSS contents are supported, on https://www.phpdocx.com/documentation/cookbook/convert-html-to-word you can read some recommendations to improve the performance when transforming HTML/CSS.

If you send to contact[at]phpdocx.com a sample script using phpdocx standalone (this is without external resources such as frameworks, CMS, web services or databases), we can check and run it. If you send this sample script, please note that we need to run it changing only the path to include phpdocx classes.

Regards.