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

不打扰是莪最后的温柔 提交于 2021-01-29 11:10:15

问题


Error when i upload video more than 15MB using ajax and Laravel

Its show me this error :

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

I use Ffmpeg and Symfony/process

the error in symfony windowsPipes.php in laravel

So what is problem?


回答1:


You can set max_execution_time in your php.ini:

max_execution_time=300

Or, in your PHP code:

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

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

Check the manual 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.




回答2:


Problem is that uploading is taking more then 30 sec, you could extend the maximum execution time like this, go to php.ini in your xampp and set this

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


来源:https://stackoverflow.com/questions/51610323/php-fatal-error-maximum-execution-time-of-60-seconds-exceeded-in-c-xampp-htdoc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!