恰好500次点击后php-cgi.exe退出 [英] php-cgi.exe quits after exactly 500 hits

查看:75
本文介绍了恰好500次点击后php-cgi.exe退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的一生,我无法弄清楚.

For the life of me, I can't figure this out.

这是我的开发机器设置:

This is my development machine setup:

Windows 7 Home Premium 64位,
网络服务器:NGINX 1.3.6 c:\ users \ user_name \ devel \ nginx
PHP:5.4.7 c:\ users \ user_name \ devel \ nginx \ php5

Windows 7 Home Premium 64 bit,
Webserver: NGINX 1.3.6 c:\users\user_name\devel\nginx
PHP: 5.4.7 c:\users\user_name\devel\nginx\php5

一切正常,除了在精确击中500次后,我的php-cgi.exe意外退出.没有错误日志,没有事件,什么都没有.它只是在击中500次之后就死了……每次.我在网上找不到单一的信息来源可以帮助我解决这个问题.所有配置似乎都是有效的.这是在两台不同的机器(我的开发台式机和笔记本)上发生的.我尝试了不同的nginx.conf和php.ini文件...仍然相同.

Everything works fine except that after exactly 500 hits, my php-cgi.exe quits unexpectedly. No error logs, no events, nothing. It just dies after 500 hits...EVERY SINGLE TIME. I haven't found a single source of information online to help me on this. All the configuration seems valid and good. This is happening on two different machines (my development desktop and my notebook). I've tried different nginx.conf and php.ini files...still the same.

我只需要更好地了解如何进行调试即可.有什么建议吗?

I just need to get a better idea on how to go about debugging this. Any suggestions?

推荐答案

我终于知道了.也许很简单,我找不到解决方案.

I finally figured it out. Maybe it was simple enough that I couldn't find the solution.

添加:

SET PHP_FCGI_MAX_REQUESTS=0 

到启动php-cgi.exe的命令文件对其进行了修复.我猜它默认(未设置时)为500次命中,然后杀死FCGI.

to the command file that launches the php-cgi.exe fixed it. I guess it defaults (when not set) to 500 hits before FCGI is killed.

显然,这样做有充分的理由,正如GargantuChet所建议的那样,正确地进行设置并让PHP实例进行托管和自动生成是更好的方法...但是对于希望快速进行Windows开发的人们环境,这可以解决一些问题.

Obviously, there are good reasons for this and as GargantuChet has suggested, settings things up correctly and letting the instances of PHP managed and auto-spawn is a better way to go...but for people who want a quick windows development environment, this can solve some problems.

这篇关于恰好500次点击后php-cgi.exe退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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