我在PHP(v5.4.13)中有一个奇怪的时间限制mgmt行为。PHP set_time_limit不适用于exec
我php.ini
设置max_execution_time
到30
,在我的剧本我打电话:
set_time_limit(1000) ;
,并确保它被设置我打电话:
error_log (ini_get('max_execution_time'));
返回我1000但现在如果我打电话给一个程序
exec("foobar.exe") ;
(长程序,它大约需要5分钟运行),该脚本停止与错误日志中:
PHP Fatal error: Maximum execution time of 120 seconds exceeded
我的问题是,为什么后120秒这个脚本停止?有任何想法吗?
try set_time_limit(0) –
同set_time_limit(0)! – user2424568