Add set_time_limit(0);
at the top of the script that is occurring the problem
The documentation says that in safe mode
this does not work, but if your php is updated maybe there is no more safe mode
, since it is obsolete since PHP 5.3 and has been removed in PHP 5.4, so set_time_limit(0);
will work, unless the server administrator blocks this function
I don’t think it’s good to adjust php.ini
, because the 30 seconds are from my point of view useful to avoid "bottlenecks".
Question:
But my question is the following, and normal happen this mistake by tar multiple users using?
Answer:
It’s not directly related, this is probably something in your script, if it accesses an external service and the service takes a while (like a webservice or a database) this can occur, but usually the increase is a few seconds, if the problem is occurring is because the script has already spent more than it should and the influence of many accesses only affects it due to the script being "misspelled" (don’t get me wrong)
Documentation: http://php.net/manual/en/info.configuration.php#ini.max-Execution-time
well some functions does several select in the database. This may be?
– Hugo Borges
@Hugoborges can be, it can be a very large array that you generate making the memory usage be larger (this usually affects only a few seconds), it can be a giant loop that you didn’t even notice. Just looking at the script to say.
– Guilherme Nascimento
was a problem in my select, it listed everything hahaha. I put a
LIMIT
– Hugo Borges