Subject: PHP problem
From: ZHAO Wei <[email-masked]>
To: [email-masked]
Date: Mon, 10 Feb 2003 23:23:03 +0800

I think this is a bug somewhere, but I'm not sure. Please help!

Please Cc: me! I'm not on the list. Thank you!

<http://www.kuro5hin.org/story/2003/2/10/102019/701>

---->8----
To reproduce:

1. Get netcat for Windows from @Stake, this is a neat tool. We will 
use it below. This is Cygwin, so you will want the winnt version of 
netcat.

2. Start apache with: $ apachectl start. Remember to enable PHP4 in 
your Cygwin setup.

3. Put a simple php script under /var/www/htdocs, say, $ echo "<?php 
echo \"hello\"; ?>" > echo.php

4. Watch the apache access log in another console window: $ tail -f 
/var/log/apache/access_log

5. Call on netcat: $ while true; do echo -e "GET /echo.php 
HTTP/1.1\nHost: 127.0.0.1\n\n" | nc 127.0.0.1 80; done

6. Now see the symptom: telnet 127.0.0.1 80, at the prompt, make a 
random HTTP request, say, GET / HTTP/1.0, remember to type CR/LF 
twice at the end of your request, now the cymptom comes out, the 
HTTP request just hangs, no response from apache.

Watch our log now, we can't see the new request at all. Only after 
we terminate the while loop for the netcat, can we see the new 
request coming to the log.

Some more experiments let me believe that it's not a Cygwin Socket 
Impl. problem, neither Apache's problem, but a PHP problem or a 
combo. Or, my misunderstanding somewhere. Any suggestions?
----8<----

I'm doing a very simple web chat room for use by only two persons, 
and I use the <meta> tag to automatically refresh every 5 seconds. 
And I saw the above problem, when one browser is in the chat room 
doing refresh, no other requests appeared in the access_log. Only 
when that browser left the chatroom, no refresh anymore, can the 
requests made previouslly appear in the access_log.

Please help!
Thank you!

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/