From:             [EMAIL PROTECTED]
Operating system: windows nt 4.0
PHP version:      4.1.1
PHP Bug Type:     Sockets related
Bug description:  >3 step communications

PHP is unrelyable in telling when data has arrived on a socket. 
socket_get_status() once the feof has resulted in true will never reset
even when data has arrived.  I have done extensive testing.  I connect to
an smtp server so i know the server side is working.  this is what is
suppose to happen:

1)client connects
2)server accepts and sends 220 ready reponse
3)client recieves 220 and sends EHLO to server
4)server recives EHLO and sends back 250 reponse along with supported
options
5)client recives 250 reponse(smtp goes on with more stuff but this is the
point where my script would disconnect)

i use a while(!feof($socket)) loop to get all the data off the port.  the
first one works and then after that no matter what data arrives
feof($socket) is always true.

socket_get_status($socket) confirms that php thinks no more has arrived
but when i look at the server i can see that data has been sent.

This was all done under 4.1.0.  i upgraded to 4.1.1 and now nothing works
at all.

testing code is here.  feel free to connect to the server and port
specified for testing.
http://dcl.nvps.net/socket.phps
http://dcl.nvps.net/socket.php

If i am wrong about this and someone has a script that proves me wrong
please email it to me and disregard this post.
-- 
Edit bug report at http://bugs.php.net/?id=15813&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=15813&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=15813&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=15813&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=15813&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15813&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=15813&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=15813&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=15813&r=submittedtwice

Reply via email to