Bug #66690 [Com]: built-in web server hangs at second invocation

From: Date: Tue, 22 Apr 2014 10:31:59 +0000
Subject: Bug #66690 [Com]: built-in web server hangs at second invocation
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185370@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66690&edit=1

 ID:                 66690
 Comment by:         gn-php-bug at hothaus dot de
 Reported by:        gn-php-bug at hothaus dot de
 Summary:            built-in web server hangs at second invocation
 Status:             Not a bug
 Type:               Bug
 Package:            Built-in web server
 Operating System:   Windows 8
 PHP Version:        5.5.10
 Assigned To:        ab
 Block user comment: N
 Private report:     N

 New Comment:

Not a bug? OK. But the documentation should be updated, no? It currently describes an approach that
definitly does not work on Windows 8. Thanks anyway.


Previous Comments:
------------------------------------------------------------------------
[2014-04-02 11:21:30] ab@php.net

Great, thanks for staying on this. Using 'localhost' literally was always not that
reliable on Windows. To be safe, an IP address is a better solution. Win8 seems also to depend on
some more configuration than just changing C:\Windows\System32\drivers\etc\hosts , intranet and DNS
settings are involved. However the hosts file could also work when disabling the DNS client service
(but not sure it's worth an experiment).

As this is a configuration issue, marking as not a bug.

Thanks

------------------------------------------------------------------------
[2014-04-02 10:22:47] gn-php-bug at hothaus dot de

This is the CURL trace in the malfunctioning case: 

I:\save\curl64>curl -v http://localhost:8000/
* Adding handle: conn: 0x2103b90
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x2103b90) send_pipe: 1, recv_pipe: 0
* About to connect() to localhost port 8000 (#0)
*   Trying 127.0.0.1...
* Connection refused
* Failed connect to localhost:8000; No error
* Closing connection 0
curl: (7) Failed connect to localhost:8000; No error

I:\save\curl64>

------------------------------------------------------------------------
[2014-04-02 10:20:19] gn-php-bug at hothaus dot de

This combination also works: 

php -S 127.0.0.1:8000
http://localhost:8000

------------------------------------------------------------------------
[2014-04-02 10:06:15] gn-php-bug at hothaus dot de

I looked at what was the difference between the example you gave me and what I used, and here is
what I found:

I used to use the URL as shown in the PHP manual at http://www.php.net/manual/en/features.commandline.webserver.php


php -S localhost:8000
http://localhost:8000

This leads to the desctibed malfunction on Windows 8.

But if I use your version:

php -S 127.0.0.1:8000
http://127.0.0.1:8000

It works on my Windows 8 system.

------------------------------------------------------------------------
[2014-04-02 07:24:36] ab@php.net

@gn-php-bug that's what i see here on win8 with your snippet

>php -S 127.0.0.1:8080 -t.

$ curl -v http://127.0.0.1:8080/66690.php
* About to connect() to 127.0.0.1 port 8080 (#0)
*   Trying 127.0.0.1...
* Adding handle: conn: 0x2317e80
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x2317e80) send_pipe: 1, recv_pipe: 0
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET /66690.php HTTP/1.1
> User-Agent: curl/7.30.0
> Host: 127.0.0.1:8080
> Accept: */*
>
< HTTP/1.1 200 OK
< Host: 127.0.0.1:8080
< Connection: close
< X-Powered-By: PHP/5.5.12-dev
< Content-type: text/html
<
<html>
 <head>
  <title>PHP-Test</title>
 </head>
 <body>
 <p>Hello World</p> </body>
</html>
* Closing connection 0

So no reproduce for me, any request is served. Have to figure out what the difference is, maybe
something of this could help
- try another win8 machine
- try to change the port
- try to change ip
- use curl or anything else you can to see more in background

Maybe you could take a closer look on the diff in the network configuration between your win7 and
win8.

Thanks

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=66690


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=66690&edit=1


Thread (11 messages)

« previous php.bugs (#185370) next »