这种情况只会在使用Google Chrome和Chromium浏览器,以及全新安装的Laravel时出现。
页面显示为空白,在控制台中显示如下内容:
(failed) net::ERR_INCOMPLETE_CHUNKED_ENCODING
而不是默认的欢迎视图,“You have arrived.”
我的服务器是Debian Wheezy,使用ISPConfig、Apache 2.2和PHP 5.4。
有人知道该如何解决吗?
这种情况只会在使用Google Chrome和Chromium浏览器,以及全新安装的Laravel时出现。
页面显示为空白,在控制台中显示如下内容:
(failed) net::ERR_INCOMPLETE_CHUNKED_ENCODING
而不是默认的欢迎视图,“You have arrived.”
我的服务器是Debian Wheezy,使用ISPConfig、Apache 2.2和PHP 5.4。
有人知道该如何解决吗?
/var/log/nginx/vagrant.com-error.log.1
文件,并看到了以下内容:
我再次检查了Vagrant虚拟机中的nginx lib目录权限:[crit] 1020#0: *774 open() "/var/lib/nginx/fastcgi/3/03/0000000033" failed (13: Permission denied) while reading upstream, client: 192.168.56.1, server: 192.168.56.102.xip.io, request: "GET /_debugbar/assets/javascript?1423122680 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "my-host", referrer: "http://url/that/fails"
ll /var/lib/
"英译中:"我曾经遇到和你一模一样的问题。我在这个论坛帖子上找到了一个解决方法: http://laravel.io/forum/02-08-2014-another-problem-only-with-chrome
提供解决方法的人使用的代码是:http://laravel.io/bin/eyyDj#4,7 它的要点就是告诉 Chrome 每个请求会有多少数据,这样它就不必分块传输数据。
我看到有报道称升级到 PHP 5.5 也可以解决这个问题,但并非所有人都能控制自己的服务器。
编辑:盲目应用这个解决方法会导致重定向时出现错误。这是我现在正在使用的代码:
App::after(function($request, $response) {
// Fixes a strange issue with Chrome. Should theoretically be removeable
// after upgrading PHP to 5.5 from 5.4
if ($response instanceof Illuminate\Http\Response) {
$response->header('Content-Length', strlen($response->getOriginalContent()));
}
});
curl -I
命令到您的 Laravel 主页时,会出现什么错误?这应该会显示头信息。 - Giacomo1968