Question

Im trying to run a bigger php script FPDF with HTML2PDF script. Im getting an "Cannot set time limit in safe mode" error and i have this in the top of my script. (I have it on 2 pages).

<?php
ini_get('safe_mode');
set_time_limit(0);

but im stil getting these 2 (3) errors.

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in /html2pdf.class.php on line 3

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in /_class/parsingCss.class.php on line 3

Fatal error: Maximum execution time of 30 seconds exceeded in /_class/parsingCss.class.php on line 1242

Do someone have an ideer to fix this ?

I can't get to the php.ini file.

Was it helpful?

Solution

When you get an error, take that opportunity to read the docs. In this case, the docs for set_time_limit().

This function has no effect when PHP is running in safe mode. There is no workaround other than turning off safe mode or changing the time limit in the php.ini.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top