php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17618 fwrite() lies that it writes
Submitted: 2002-06-05 21:55 UTC Modified: 2002-06-18 04:56 UTC
From: hz11 at nyu dot edu Assigned:
Status: Closed Package: Network related
PHP Version: 4.1.2 OS: FreeBSD
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hz11 at nyu dot edu
New email:
PHP Version: OS:

 

 [2002-06-05 21:55 UTC] hz11 at nyu dot 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




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-18 04:56 UTC] derick@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 04:01:28 2024 UTC