#21760 [Com]: socket_read PHP_NORMAL_READ problem
| From: | wills at housing dot ufl dot edu | Date: | Thu, 15 May 2003 13:37:45 +0000 |
| Subject: | #21760 [Com]: socket_read PHP_NORMAL_READ problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-39700@lists.php.net to get a copy of this message | ||
ID: 21760
Comment by: wills at housing dot ufl dot edu
Reported By: sunday at csh dot rit dot edu
Status: No Feedback
Bug Type: Sockets related
Operating System: FreeBSD 4.7
PHP Version: 4.3.0
New Comment:
I am having a similar problem with the latest -STABLE snapshot from
8:30GMT today. When I use socket_read with PHP_NORMAL_READ, I get no
data returned and 'Operation completed successfully' as the returned
error.
This is on a Win2k SP3 system, IIS 5.0, again with the latest -STABLE
snapshot. This also occurs with 4.3.2-RC2.
I would be happy to test patches but I do not have the means to compile
a new PHP so I am depending on the SNAPSHOTs.
Previous Comments:
------------------------------------------------------------------------
[2003-03-19 16:00:22] hans at nyu dot edu
I'd like to supply some feedback to this bug. I'm operating in nearly
an identical environment: FreeBSD 4.7-STABLE, PHP 4.3.1 CLI.
It seems that specifying PHP_NORMAL_READ works, however it'll give an
erroneous error:
$buf = socket_read($csock,4096,PHP_NORMAL_READ);
will yield:
socket_read() unable to read from socket [54]: Connection reset by
peer
but:
$buf = socket_read($csock,4096);
will give no error. Now both the above situations are when less than
4096 bytes of data are written on the other end of the socket. If I
specify a length of 5 and write 5, I don't believe I see the error,
however, placing the PHP_NORMAL_READ call in a loop will iterate an
extra time and cause the error again.
I know my report is bit a scant, but I can supply any additional data
if needed.
Regards
------------------------------------------------------------------------
[2003-03-09 18:49:39] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
------------------------------------------------------------------------
[2003-02-28 06:56:44] chuck at fuck dot org
I've upgraded to tonights CVS and still have the same problem with
socket_read. The fix posted did work for 4.3.0 but i'm hesitant to use
it again for obvious reasons.
------------------------------------------------------------------------
[2003-02-27 10:16:20] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Works fine here with latest stable CSV.
The path you prose is bogus because it overwrites the 1st byte in t
with a 0.
------------------------------------------------------------------------
[2003-02-05 21:13:53] chip at cyan dot com
ah. found my windows 2000 socket_read bug:
http://bugs.php.net/bug.php?id=21197
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21760
--
Edit this bug report at http://bugs.php.net/?id=21760&edit=1