PHP 4.0 Bug #7002: Cannot use the same persistant socket connection from different php scripts

From: Date: Wed, 04 Oct 2000 04:36:02 +0000
Subject: PHP 4.0 Bug #7002: Cannot use the same persistant socket connection from different php scripts
Groups: php.dev 
Request: Send a blank email to php-dev+get-34173@lists.php.net to get a copy of this message
From: gavin.wood@hudd.rage.co.uk Operating system: Windows 98 PHP version: 4.0.1pl2 PHP Bug Type: Scripting Engine problem Bug description: Cannot use the same persistant socket connection from different php scripts Dear Sirs, I am using PHP 4.0.1pl2 under Apache with Windows 98. I am trying to create a persistant sockets connection which I can use from different php files. I find I can happily send packets to (and receive from) this server from the php script where I open the connection. However, I cannot pass my file handle across php scripts, or get this working in a different script by holding the file handle in a session variable. My script temp. <?php $mysocket = pfsockopen ("10.0.0.62", 23, &$errno, &$errstr); header ("Location: http://wood/temp2.php ?mysocket=".urlencode($mysocket)); ?> and temp2 which is called from temp. <?php fputs ($mysocket, "Hello"); $message= fgets ($mysocket, 256); ?> The error output is shown below. I have also echoed the file handle. It is Resource id #1. Warning: Supplied argument is not a valid File-Handle resource in c:/apache/htdocs/temp2.php on line 6 Warning: Supplied argument is not a valid File-Handle resource in c:/apache/htdocs/temp2.php on line 7 Thanks for your time Gavin Wood

« previous php.dev (#34173) next »