PHP致命错误:在第140行的C:\ xampp \ htdocs \ vendor \ symfony \ process \ Pipes \ WindowsPipes.php中,超过60秒的最大执行时间 [英] PHP Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\vendor\symfony\process\Pipes\WindowsPipes.php on line 140

查看:44
本文介绍了PHP致命错误:在第140行的C:\ xampp \ htdocs \ vendor \ symfony \ process \ Pipes \ WindowsPipes.php中,超过60秒的最大执行时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

When I try to upload video that is larger than 15MB using Ajax and Laravel I get this error:

PHP致命错误:第140行的C:\ xampp \ htdocs \ vendor \ symfony \ process \ Pipes \ WindowsPipes.php中超过60秒的最大执行时间

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

我使用 Ffmpeg Symfony/process

Laravel中中的错误.

the error in symfony windowsPipes.php in Laravel.

出什么问题了?

推荐答案

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

You can set max_execution_time in your php.ini:

max_execution_time=300

或者,在您的PHP代码中:

Or, in your PHP code:

ini_set('max_execution_time', 300); // 5 minutes

将其设置为零将消除限制,但是在这种情况下,apache可能也会超时.

Setting it to zero removes the restriction, however apache might also time out in that scenario.

查看手册 http://php.net/manual/zh/info.configuration.php#ini.max执行时间

这设置了允许脚本运行的最长时间(以秒为单位),该脚本被解析器终止.这有助于防止编写不正确的脚本占用服务器.默认设置为30.从命令行运行PHP时,默认设置为0.

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.

最大执行时间不受系统调用,流操作等影响.有关更多详细信息,请参见set_time_limit()函数.

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

在安全模式下运行时,无法使用ini_set()更改此设置.唯一的解决方法是关闭安全模式或通过更改php.ini中的时间限制.

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.

您的Web服务器可以具有其他超时配置,这些配置也可能会中断PHP执行.Apache具有Timeout指令,而IIS具有CGI超时功能.两者默认为300秒.有关详细信息,请参见您的Web服务器文档.

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致命错误:在第140行的C:\ xampp \ htdocs \ vendor \ symfony \ process \ Pipes \ WindowsPipes.php中,超过60秒的最大执行时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆