php中的执行时间限制没有设置为无限时间? [英] Execution time limit in php not setting to infinte time?

查看:30
本文介绍了php中的执行时间限制没有设置为无限时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 xampp v3.30 版本的 php.ini 上提供了这些设置

I have given these settings on my php.ini which is a xampp v3.30 version

max_execution_time=10000
max_input_time=60

我的 php 脚本调用一个 python api,它循环数据库并在 15 分钟内将值返回到 php 页面.现在脚本改变了,它需要超过 15 分钟.大约 1 小时将数据返回到页面.所以我将设置更改为

My php script calls an python api which loops db and get value back to php page in a 15 min time. Now the script change and and it takes more than 15 min. approx 1 hour to get back the data to page. so I changes the setting to

max_execution_time=21600
max_input_time=21600
default_socket_timeout=21600

但 php 页面仍然在 20 分钟后退出,但我可以看到 python 服务器仍在运行,并在上述时间后将结果提供给服务器控制台.如何将我的网页设置为绕过此超时?请帮助并提前致谢.我搜索了很多尝试,但没有给我结果.

But still the php page exit at an exact 20 min time, but I can see the python server still running and gives the result to server console after the said time. How can I set my web page to by pass this timeout ? Please help and thanks in advance. I searched a lot tried but it not giving me a result.

推荐答案

似乎设置为 0(有时是 -1)的值描述了无穷大

It seems that a value set to 0 (and sometimes -1) describes infinity

试试这个:

max_execution_time=0
max_input_time=0

来源:

https://www.php.net/manual/fr/info.configuration.php#ini.max-input-timehttps://www.php.net/手册/fr/info.configuration.php#ini.max-execution-time

这篇关于php中的执行时间限制没有设置为无限时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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