A
A
accountnujen2021-12-09 23:09:42
PHP
accountnujen, 2021-12-09 23:09:42

Why is max_execution_time being ignored?

php.ini is set to max_execution_time = 30 , but this kind of script is executed to the end

for( $i = 0 ; $i < 100 ; $i++ ){
    echo $i . '<br />';
    sleep(1);
}


php.ini address looked in phpinfo();
/etc/php/8.0/apache2/php.ini

despite the fact that on the local machine OpenServer is set to 60 and at 60 seconds the script stops successfully with an error

How can I find out what can interrupt this setting?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nokimaro, 2021-12-09
@accountnujen

This is normal behavior
. It also ignores the time spent calling functions such as

usleep
file_get_contents
exec
mysqli_query

ps on a local server, that is, on windows, the behavior may differ from linux systems.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question