ID: 15976
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Sockets related
Operating System: Win32 (2000) AND Linux2.2
PHP Version: 4.1.2
New Comment:
PS: Go for the most recent snap you can find, or better
yet, actually check it out from CVS.
--Wez. :-)
Previous Comments:
------------------------------------------------------------------------
[2002-03-18 15:26:39] [EMAIL PROTECTED]
Could you try this with a current CVS snapshot?
The file/socket layer has been rewritten so this
should be fixed.
------------------------------------------------------------------------
[2002-03-12 21:48:57] [EMAIL PROTECTED]
Oops. Regarding my previous comment:
line 968 reads "what = zend_fetch_resource(socket TSRMLS_CC, -1,
"File-Handle", &type, 1, le_socket);" in CVS, not what I posted
above...
S
------------------------------------------------------------------------
[2002-03-12 21:44:49] [EMAIL PROTECTED]
Alright. So, here's what I've dug up so far:
file: [php]/ext/standard/file.c
line: 968
code: zend_fetch_resource(socket_arg TSRMLS_CC,-1,"Socket
-Handle",NULL,1,php_file_le_socket());
This always line returns false for a valid socket resource (I verified
the resource using `is_resource($sock)` and `get_resource_type($sock)`
for both my listen socket and my message socket.
get_resource_type($sock) returns "Socket".
So, when the next line (969), "ZEND_VERIFY_RESOURCE(what);" is called,
it determines that 'what' is false and calls RETURN_NULL;
I tried screwing with the args in zend_fetch_resource(...), but I don't
know the API well enough (and my C/C++ is more than rusty).
I hope someone takes a look at this soon, I currently have no way of
knowing the status of my sockets (I need to know when a client
disconnects -> eof )
S
------------------------------------------------------------------------
[2002-03-12 21:00:39] [EMAIL PROTECTED]
It's a non-blocking socket, if that helps
S
------------------------------------------------------------------------
[2002-03-09 17:34:26] [EMAIL PROTECTED]
Also note: This is a listening socket (host / server / whatever) -- ie,
not created with fsockopen; created with socket_create, socket_bind,
socket_listen, socket_accept. There's a note in the manual about this
not working properly, but I didn't see it in the bug DB.
------------------------------------------------------------------------
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/15976
--
Edit this bug report at http://bugs.php.net/?id=15976&edit=1