|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-10-04 00:59 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 12 08:00:02 2026 UTC |
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