PHP脚本300秒后终止,php.ini已设置max_execution_time=2400
PHP 8 XAMPP环境中max_execution_time设置失效问题
环境与测试细节
- 本地运行环境:搭载PHP 8的XAMPP
- 测试1:执行代码
echo ini_get('max_execution_time');,输出结果为2400,与php.ini中的设置值一致 - 测试2:执行以下代码
输出结果:echo "Max execution time: ".ini_get("max_execution_time")."<br />"; echo "Max input time: ".ini_get("max_input_time")."<br />";Max execution time: 2400<br>Max input time: 60 - 测试3:执行代码
ini_set('MAX_EXECUTION_TIME', '-1');后问题未解决,仍然抛出错误:致命错误:超过300秒的最大执行时间,错误位置:C:\xampp\htdocs..\inc\datenbank.php 第xx行
内容的提问来源于stack exchange,提问作者Thomas Kujawa
相关产品推荐
相关产品推荐

