Answer the question
In order to leave comments, you need to log in
How to disable 180 seconds limit on script execution in PHP7?
(PHP 7.3, Windows)
There is a php script that is run by the scheduled task scheduler using php-cgi. The script should download a 1GB file, unzip it, and put it in the database. After 180 seconds the script stops and aborts. In the logs, the message: " PHP Fatal error: Maximum execution time of 180 seconds exceeded in ...". (Actually, not after 180, but it may take longer. It depends on how fast the file is downloaded, unzipped and transferred to the database).
As far as I understand, the problem is just in safe mode, which sets such a restriction. Is there any way to disable safe mode or change the 180 second limit?
In php5 this was done via the safe_mode = Off parameter .
In php7, as I understand it, it is not.
set_time_limit(0); // не работает
in php.ini:
max_execution_time = 0 # doesn't work
safe_mode = Off # also doesn't work accordingly I
also thought that the problem is in php compilation mode and tried to recompile php7.3 with the --disable-safe-mode option, but there is no such argument for confugure exist.
Answer the question
In order to leave comments, you need to log in
Look here: Maximum execution time of 30 seconds exceeded error
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question