gpt4 book ai didi

PHP fatal error : Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\vendor\symfony\process\Pipes\WindowsPipes. php 第 140 行

转载 作者:行者123 更新时间:2023-12-04 11:52:53 27 4
gpt4 key购买 nike

当我尝试使用 Ajax 和 Laravel 上传大于 15MB 的视频时,出现此错误:

PHP Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\vendor\symfony\process\Pipes\WindowsPipes.php on line 140


我用 FfmpegSymfony/process symfony windowsPipes.php 中的错误在 Laravel 中。
什么是问题?

最佳答案

您可以在 php.ini 中设置 max_execution_time:

max_execution_time=300
或者,在您的 PHP 代码中:
ini_set('max_execution_time', 300); // 5 minutes
将它设置为零会取消限制,但是在这种情况下 apache 也可能超时。
检查手册
http://php.net/manual/en/info.configuration.php#ini.max-execution-time

This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. This helps prevent poorly written scripts from tying up the server. The default setting is 30. When running PHP from the command line the default setting is 0.

The maximum execution time is not affected by system calls, stream operations etc. Please see the set_time_limit() function for more details.

You can not change this setting with ini_set() when running in safe mode. The only workaround is to turn off safe mode or by changing the time limit in the php.ini.

Your web server can have other timeout configurations that may also interrupt PHP execution. Apache has a Timeout directive and IIS has a CGI timeout function. Both default to 300 seconds. See your web server documentation for specific details.

关于PHP fatal error : Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\vendor\symfony\process\Pipes\WindowsPipes. php 第 140 行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51610323/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com