Xdebug延长调试时间
因为我在phpstorm用xdebug调试时,没过多久就断掉然后出现500服务器错误的现象
解决办法
1. 打开apache的配置文件,在apache\conf\httpd.conf里修改
找到这一行并且把前面的注释去掉
Include conf/extra/httpd-default.conf
添加这一行
Include conf/extra/httpd-fcgid.conf
2.在apache\conf\extra\httpd-default.conf里修改
直接在文档末尾处加上下面这段文字,具体时间可以自己修改
#xdebug:
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 7200
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 0
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 7200
3.在apache\conf\extra目录下新建一个httpd-fcgid.conf文件,这个就是我们刚才在配置文件加的,然后把下面的内容加进去
ProcessLifeTime 7200
FcgidIOTimeout 7200
FcgidConnectTimeout 7200
FcgidOutputBufferSize 128
FcgidMaxRequestsPerProcess 1000
FcgidMinProcessesPerClass 0
FcgidMaxProcesses 16
FcgidMaxRequestLen 268435456
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000
IPCConnectTimeout 7200
IPCCommTimeout 7200
FcgidIdleTimeout 7200
FcgidBusyTimeout 60000
FcgidBusyScanInterval 120
FcgidInitialEnv PHPRC "D:\phpstudy_pro\Extensions\php\php7.4.3nts"
AddHandler fcgid-script .php
FcgidInitialEnv PHPRC 这一行填写你使用的php路径
修改完apache记得重启一下!!
4.在php的配置文件php.ini里修改
找到这一行,修改成你配置的时间
max_execution_time=7200
————————————————
版权声明:本文为CSDN博主「LU离下」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_43888304/article/details/120802226
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律