Bug #17618: fwrite() lies that it writes

From: Date: Thu, 06 Jun 2002 01:55:37 +0000
Subject: Bug #17618: fwrite() lies that it writes
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-9588@lists.php.net to get a copy of this message
From: hz11@nyu.edu Operating system: FreeBSD PHP version: 4.1.2 PHP Bug Type: Network related Bug description: fwrite() lies that it writes I'm using 4.1.2 as an Apache module, with the latest 1.x apache on FreeBSD 4.5. I open a remote server with fsockopen('remote.host', 80)), then fwrite() to it , which works fine. A problem I noticed is when the remote server (apache) closes the connection (for instance, if I send Connection: close in the HTTP header). If I then fwrite() to the socket, fwrite reports the number of bytes written. However, nothing comes out the other end, of course. Shouldn't fwrite be returning -1 ? Also, I run is_resource() on the socket, which also returns true. Is this expected behavior, or a bug? Thanks, Hans -- Edit bug report at http://bugs.php.net/?id=17618&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17618&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17618&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17618&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17618&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17618&r=support Expected behavior: http://bugs.php.net/fix.php?id=17618&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17618&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17618&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17618&r=globals

« previous php.bugs (#9588) next »