Bug #17618 Updated: fwrite() lies that it writes

From: Date: Tue, 18 Jun 2002 08:56:52 +0000
Subject: Bug #17618 Updated: fwrite() lies that it writes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-11069@lists.php.net to get a copy of this message
ID: 17618 Updated by: derick@php.net Reported By: hz11@nyu.edu -Status: Open +Status: Closed Bug Type: Network related Operating System: FreeBSD PHP Version: 4.1.2 New Comment: This bug has been fixed in CVS. You can grab a snapshot of the CVS version at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-06-05 21:55:36] hz11@nyu.edu 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 this bug report at http://bugs.php.net/?id=17618&edit=1

« previous php.bugs (#11069) next »