PHP本地服务器无效请求(意外的EOF) [英] PHP local server Invalid request (Unexpected EOF)

查看:122
本文介绍了PHP本地服务器无效请求(意外的EOF)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次执行后,无论执行了什么操作-使用Chrome网络浏览器时,PHP本地服务器都会引发此错误:

After every execution, regardless of said execution - when using Chrome web browser the PHP local server throws this error:

无效请求(意外的EOF)\ n

Invalid request (Unexpected EOF) \n

这不会引起任何可见的问题;但是,由于这是一个长期存在的问题,我想知道以后是否有东西会咬我.

It's not causing any visible issues; however as it's a persistent issue I was wondering if something may bite me later.

有什么想法吗?

注意:它会在执行任何页面后大约10秒钟发生.

Note: it happens roughly 10 seconds after any page is executed.

进一步的注意事项:即使在执行所有文件后,这种情况也会在所有执行之后发生 正确结束:

Further note: This happens after all executions, even when the files are ended correctly:

<?php echo 'hey'; ?> 

仍然会抛出上述错误.

would still throw the aforementioned error.

[2015年3月19日星期四09:39:55] 127.0.0.1:53923 [200]:/admin [2015年3月19日星期四09:40:05] 127.0.0.1:53924无效的请求(意外的EOF)

[Thu Mar 19 09:39:55 2015] 127.0.0.1:53923 [200]: /admin [Thu Mar 19 09:40:05 2015] 127.0.0.1:53924 Invalid request (Unexpected EOF)

这是完整的错误.

推荐答案

这是一个已知的错误.

来自 https://bugs.php.net/bug.php?id=60471 :

[2011-12-08 15:01 UTC] gmail dot com上的lolautruche说明:
------------
有时,带有路由器脚本的内置服务器会记录以下内容:

[2011-12-08 15:01 UTC] lolautruche at gmail dot com Description:
------------
From time to time, built-in server with router script logs this kind of stuff :

[2011年12月8日星期四13:39:29] 127.0.0.1:50358无效的请求(意外 EOF)

[Thu Dec 8 13:39:29 2011] 127.0.0.1:50358 Invalid request (Unexpected EOF)

无论脚本有关闭标记还是 否,无论关闭标记后是否有空白行.

This happens quite randomly, whatever the script has a close tag or not, whatever it has a blank line after close tag or not.

解释:

[2012-02-23 18:45 UTC]在gmail点com上的michal点pipa点xsolve
...
Chromium具有称为预测网络操作以改善页面质量"的功能 加载性能",并且默认情况下已启用. 如果HTML页面包含指向某些资源的链接,则Chromium会打开 提前10个TCP连接.然后,如果浏览器的数量少于10 要获取的资源,未使用的连接会在10秒后超时. 并且此(空有效负载)使PHP服务器显示无效的请求 (意外的EOF)"消息.

[2012-02-23 18:45 UTC] michal dot pipa dot xsolve at gmail dot com
...
Chromium has feature called "Predict network actions to improve page load performance" and its enabled by default. It works this way, that if HTML page has links to some resources, than Chromium opens about 10 TCP connections in advance. And then if browser has less than 10 resources to fetch, unused connections times out after 10 seconds. And this (empty payload) causes PHP server to display "Invalid request (unexpected EOF)" message.

这是来自PHP内置服务器的无害错误.

It is a harmless error from the PHP built-in server.

这篇关于PHP本地服务器无效请求(意外的EOF)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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