Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/286.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php ApacheHTTP500,但当刷新渲染正确时_Php_Apache_Zend Framework - Fatal编程技术网

Php ApacheHTTP500,但当刷新渲染正确时

Php ApacheHTTP500,但当刷新渲染正确时,php,apache,zend-framework,Php,Apache,Zend Framework,我有一个网站(移动网络)运行在2台服务器和1台平衡器与haproxy,操作系统ubuntu 10.10 Apache配置: Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild

我有一个网站(移动网络)运行在2台服务器和1台平衡器与haproxy,操作系统ubuntu 10.10

Apache配置:

Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

StartServers          5
MinSpareServers       5
MaxSpareServers      10
MaxClients          150
MaxRequestsPerChild   0
该网站运行良好,但现在经常会突然返回空白页面HTTP500(30-50ms中有20个字节),没有错误消息,但当我刷新它时,会正确呈现

有人知道哪里可能出错吗

更新:

我不知道这种关联性是否存在,但任何时候都无法加载浏览器会促使我下载内容,当我检查下载的文件(名称:Random_Chars.~.part)时,我发现在HTML的标题中,这些代码是由浏览器添加的

meta http-equiv="Content-Type" content="text/html; charset=utf-8" meta name="viewport" content="width = device-width, maximum-scale = 1.0, initial-scale = 1.0" meta name="apple-mobile-web-app-capable" content="yes" --- ADDED BY BROWSER -- link href="styles/reset.css" rel="stylesheet" type="text/css" link href="styles/base.css" rel="stylesheet" type="text/css" script type="text/javascript" src="scripts/templates.js" script type="text/javascript" function init() { var mySlideshow = new Slideshow ("slideshow", 0, true); var myToggle = new ToggleSwitch(["toggler1","toggler2","toggler3"]); var myStyleTweaks = new StyleTweaker(); myStyleTweaks.add("Series60/5.0", "styles/tweaks/S605th.css"); myStyleTweaks.add("Series60/3.2", "styles/tweaks/S603rdFP2.css"); myStyleTweaks.add("AppleWebKit/420+", "styles/tweaks/S406th.css"); myStyleTweaks.add("N900", "styles/tweaks/maemo.css"); myStyleTweaks.add("Firefox/3.0a1 Tablet browser 0.3.7", "styles/tweaks/maemo.css"); myStyleTweaks.add("Opera Mini/4", "styles/tweaks/operamini.css"); myStyleTweaks.tweak(); } addEvent("onload",init); /script meta http equiv=“Content Type”Content=“text/html;charset=utf-8” meta name=“viewport”content=“宽度=设备宽度,最大比例=1.0,初始比例=1.0” meta name=“支持苹果移动网络应用”content=“是” ---通过浏览器添加-- link href=“styles/reset.css”rel=“stylesheet”type=“text/css” link href=“styles/base.css”rel=“stylesheet”type=“text/css” script type=“text/javascript”src=“scripts/templates.js” script type=“text/javascript” 函数init(){ var mySlideshow=newslideshow(“Slideshow”,0,true); var myToggle=newtoggleswitch([“toggler1”、“toggler2”、“toggler3”); var myStyleTweaks=newstyletweaker(); 添加(“Series60/5.0”,“style/tweaks/S605th.css”); 添加(“Series60/3.2”,“style/tweaks/S603rdFP2.css”); 添加(“AppleWebKit/420+”,“style/tweaks/s406.css”); 添加(“N900”,“style/tweaks/maemo.css”); 添加(“Firefox/3.0a1平板电脑浏览器0.3.7”,“style/tweaks/maemo.css”); 添加(“operamini/4”,“style/tweaks/operamini.css”); myStyleTweaks.tweak(); } addEvent(“加载”,初始); /剧本 在Apache错误日志中,我发现了这一行:

[client ip] File does not exist: /var/www/http:, referer: http://domain.com/search [客户端ip]文件不存在:/var/www/http:,引用者:http://domain.com/search 注意文件名“http:”

它的响应有时不是500而是200 OK,但内容是空白的,直到我刷新几次
任何帮助都将不胜感激。

请检查服务器的错误日志,其中可能包含有用的错误消息。不要忘记启用日志记录(在ZF配置中,PHP的log_errors=1;phpSettings.log_errors=1)


脚本似乎在有机会设置内容类型标题之前崩溃,因此浏览器不知道如何处理响应,这就是为什么您会看到下载对话框。

很抱歉,我发现是APC模块造成的,我禁用了APC,然后那些奇怪的错误就消失了。

检查apache错误日志文件以获取实际的错误消息。在日志中,我发现这一行[client 192.168.1.228]文件不存在:/var/www/web/http:,referer: