Apache2+PHP 超时

Mat*_*tor 1 ubuntu php apache-2.2

在使用 Apache2 + php 的 Ubuntu 10.10 上,脚本

<?
  system("sleep 10000");
?>
Run Code Online (Sandbox Code Playgroud)

不会超时。max_execution_time 和 TimeOut 都不适用。

有什么方法可以确保脚本停止?

alv*_*osu 8

  • TimeOut 对 mod_php 没有影响。
  • max_execution_time只影响脚本本身的执行时间。除 Windows 外,使用system()exec()不计入执行时间的系统调用。