문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top