在IIS 7.5中增加php max_execution_time [英] increase php max_execution_time in IIS 7.5

查看:58
本文介绍了在IIS 7.5中增加php max_execution_time的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试增加在IIS 7.5(Windows Server 2012)上运行的PHP(5.5)中的max_execution_time值.

I'm trying to increase the max_execution_time value in PHP(5.5) running on IIS 7.5 (Windows Server 2012).

phpinfo()显示max_execution_time = 300,无论我尝试了什么.一些Internet消息来源提到此值已被IIS中的某些内容覆盖.

phpinfo() shows max_execution_time=300 regardless of what I tried. Some Internet sources mentioned that this value is overridden by something in IIS.

基于Internet搜索,我尝试了以下操作:

Based on Internet searches, I've tried the following:

  • 在php.ini中将max_execution_time编辑为1200,然后重新启动服务器-无效
  • 将CGI->行为->超时更改为1200,然后重新启动服务器-无效
  • 放入"ini_set('max_execution_time',1200);"上面的phpinfo().这实际上起到了一些作用.该页面显示本地"值是1200,而主"值仍是300.

我可以理解,第三个选项是有效的,因为它在同一脚本中并且紧邻phpinfo()行,因此具有最高优先级.但是,我正在寻找服务器范围的配置.我觉得这是可能的,而且我找的地方不对.

I can understand that the third option worked because it is in the same script and immediately above the phpinfo() line and therefore has the highest priority. However, I'm looking for a server-wide configuration. I have a feeling that it's possible, and that I'm not looking in the right place.

有人可以指出我正确的方向吗?

Can someone point me in the right direction?

谢谢

推荐答案

请检查服务器上是否存在隐藏的.htaccess文件,如果没有.htaccess文件,则可以创建一个(确保没有隐藏的htaccess文件文件,否则它将被覆盖)并粘贴此代码.

Please check for a hidden .htaccess file on your server and if there is no .htaccess file then you can create one( make sure that there is no hidden htaccess file otherwise it will overwrite) and paste this code.

php_value max_execution_time 259200

您还可以引用以下网址增加php的最大执行时间

You can also refer this url Increase max execution time for php

这篇关于在IIS 7.5中增加php max_execution_time的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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