|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65066 Cli server not responsive when responding with 422 http status code
Submitted: 2013-06-19 15:52 UTC Modified: 2013-06-20 19:19 UTC
Avg. Score:4.3 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:3 (100.0%)
From: mauroasprea+php at gmail dot com Assigned: aharvey
Status: Closed Package: Built-in web server
PHP Version: 5.4.16 OS:
Private report: No CVE-ID:
 [2013-06-19 15:52 UTC] mauroasprea+php at gmail dot com
If u save and run the test script sample below with the cli built in server:

php -S localhos:8000 -t .

Then when browsing to the file, the page never responds back (timeouts)

I've taken a look at the php cli server sourced and it seems that there a lot of 
missing http status codes, see

So it seems that there's an endless loop here

Test script:
echo 'Not being shown!';

Expected result:
The script should show the page with the text:

Not being shown!

And the http status code "422"

Actual result:
Fatal error: Maximum execution time of 30 seconds exceeded in Unknown on line 0

Seems to be endless loop


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-19 15:55 UTC] mauroasprea+php at gmail dot com
BTW this happens with any status code that's not in the status_map datastructure
 [2013-06-19 18:23 UTC]
-Package: CGI/CLI related +Package: Built-in web server -Assigned To: +Assigned To: aharvey
 [2013-06-19 19:29 UTC]

Might have to wait until post-5.5.0 to merge this, though. (It's already missed 
5.4.17, so I'm not too stressed if it's a few weeks — it should be in 5.4.18 
 [2013-06-20 19:19 UTC]
-Status: Assigned +Status: Closed
 [2013-06-20 19:19 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Sun Nov 29 10:01:38 2015 UTC