Answer the question
In order to leave comments, you need to log in
How to increase the execution time of a php script?
There is a script that works with the API of a certain server, selects a lot of data with gradual requests, then selects child data for each data block and forms an array in which several operations are then performed.
The script always runs for 300 seconds, but more time is needed, at least 10 minutes. Attempts to increase or remove the restriction did not lead to anything. Still get error
Fatal error: Maximum execution time of 300 seconds exceeded in C:\OpenServer\domains\........
Here's what I've tried:
In php.ini
max_execution_time = 86400
max_input_time = 86400
set_time_limit(0);
ini_set('MAX_EXECUTION_TIME', 86400);
ini_set('MAX_EXECUTION_TIME', -1);
Answer the question
In order to leave comments, you need to log in
Question tagged CodeIgniter
In the folder /system/core/CodeIgniter.php on line 127 there is an internal limit set_time_limit(300) which was not so easy to find)
Run such scripts in the console.
For CLI SAPI, the runtime limit is always disabled.
Both php and the server (nginx/apache/etc) have limits. You have changed in one place only.
Here is the answer to your question - https://www.pandoge.com/stati_i_sovety/kak-uvelich...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question