How to keep a php script from timing out because of a long mysql query

后端 未结 5 1793
盖世英雄少女心
盖世英雄少女心 2020-12-29 11:07

I have an update query being run by a cron task that\'s timing out. The query takes, on average, five minutes to execute when executed in navicat.

The code looks ro

5条回答
  •  天涯浪人
    2020-12-29 11:19

    Is your php running in safe-mode? Quote from PHP manual of 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.

提交回复
热议问题