|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-11-21 12:04 UTC] mfischer@php.net
[2001-12-13 06:24 UTC] sander@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 20:00:01 2025 UTC |
config line: './configure' '--with-apache=/usr/local/apache_1.3.14' '--with-mysql=/usr/local/mysql' '--with-ldap' '--with-imap' '--enable-ftp' '--enable-yp' '--enable-track-vars' any connections that are opened by pfsockopen are not being retained such that subsequent page calls to this script will be able to utilize the open connection (yes, the server is still connected and listening to the connection made) but php will not allow to reuse that connection. error message: Warning: Supplied argument is not a valid File-Handle resource in /home/ralph/ralphschindler-www/projects/client_rs_cpen471.php on line 19 the calling form after the connection is made looks like this: <form method=post action=client_rs_cpen471.php> <input type=hidden name=mysocket value="Resource id #1"> <input type=hidden name=connect_string value="snarff.net 4115"> <input type=text name=command> <input type=submit> Is this a bug? there is scarce info on this issue on the web.... here is the code i was using to test this client app: <html><body><pre> <? $connect_string = "serversomewhere.net 4115"; if (isset($connect_string)) { list($connect_host, $connect_port) = split(" ", $connect_string); /* Check to see if a connection is already open */ if(!isset($mysocket)) { echo "Starting Connection on $connect_host - $connect_port<br>\n"; $mysocket = pfsockopen($connect_host, $connect_port, $error_no, $error_str, 180); } else { echo "Using open connection on $host - $port -> $mysocket<br>\n"; fputs($mysocket,"$command"); echo fread($mysocket,128); fclose($mysocket); } echo $error_no . "\n\n" . $error_str; ?> <form method=post action=client_rs_cpen471.php> <input type=hidden name=mysocket value="<? echo $mysocket; ?>"> <input type=hidden name=connect_string value="<? echo $connect_string; ?>"> <input type=text name=command> <input type=submit> </form>