This happens because the Resource ID is a pointer to the socket, not the
You are storing the value of the resource ID (i.e. '1') in the database.
However, when you are pulling it out, you are pulling it out as an int, and
not a socket identifier.
Keep the socket identifier as a global variable/pointer, or pass it through
functions with the arguments.
----- Original Message -----
From: Gareth Thomas <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 1:26 PM
Subject: [PHP] re-writing to the same socket
> I have some code that writes data to a socket (works fine) and stores the
> resource id created in a table with the column defined as varchar (80).
> the next time I need to write data to the same IP I retrieve the resource
> and reuse it. Problem is that the socket_write seems to work fine (it
> returns no error) and yet the data appears to disappear into the ether...I
> am using 4.2.3 client on Win2K and server on Linux.
> Anyone have any ideas.
> Any help much appreciated.
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php