Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 php 脚本在 10 分钟后被操作系统(debian)杀死
我不希望它被杀死
有人告诉我,我的服务器可能有一个任务监视器,它可以杀死长时间运行的进程以防止锁定。
我不知道如何访问任务监视器以及如何禁用它
Apache 错误日志说什么?
如果您有错误:
Fatal error: Maximum execution time of ...
那么你必须关闭 PHP 脚本执行时间的限制,可以这样设置:
set_time_limit(0); // limit in seconds, 0 for unlimited while (1)// test loop { $a = 0; }
您可以在php.ini文件中将此选项设置为max_execution_time.
php.ini
max_execution_time