From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.0.4pl1
PHP Bug Type:     Sockets related
Bug description:  pfsockopen - socket_get_status has EOF set.. feof() returns false

i have found that socket_get_status will say that an EOF has occurred but feof() says 
otherwise (and the socket isn't disconnected). feof() seems to be working fine.
im using pfsockopen() to create the socket.

also, im seeing 0 bytes unread until i attempt reading once, then the correct number 
of bytes remaining are listed. 

this may be unrelated but once i have read all of the bytes remaining, i get a EOF 
(detected by feof() and the connection is toast after that point). it could be a bug 
somewhere in my scripts logic.. but who knows.


System Linux 2.0.36 #4 Thu Aug 19 23:54:41 CDT 1999 i586 unknown 
Build Date Jan 15 2001 
Configure Command './configure' '--with-mysql' '--with-apache=../apache_1.3.4' 
'--enable-track-vars' 
Server API Apache 
Virtual Directory Support disabled 
Configuration File (php.ini) Path /usr/local/lib 
ZEND_DEBUG disabled 
Thread Safety disabled 


code snippit:

 $stat = socket_get_status($socketptr);
 if ($stat["eof"] == 1) {
                if (!(feof($socketptr))) {
                        print "socket_get_status lied?";
                        return true;
                }
                else {
                        fclose($socketptr);
                        print "REMOTE CLOSED CONNECTION<br>";
                        exit;  
                }
        }




-- 
Edit Bug report at: http://bugs.php.net/?id=8775&edit=1



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to