Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
218 views
in Technique[技术] by (71.8m points)

PHP local server Invalid request (Unexpected EOF)

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

Invalid request (Unexpected EOF)

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

Any ideas?

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.

[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)

This is the full error.

question from:https://stackoverflow.com/questions/29141240/php-local-server-invalid-request-unexpected-eof

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This is a known bug.

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

[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 :

[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.

And the explanation:

[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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...