ID: 10426
Updated by: mfischer
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Sockets related
Operating System: Linux snarff 2.2.16-3smp #1 SMP
PHP Version: 4.0.3
New Comment:

Can you please try the latest RC and see if it works

http://www.php.net/~zeev/php-4.1.0RC3.tar.gz

Feedback.

Previous Comments:
------------------------------------------------------------------------

[2001-04-20 14:22:05] [EMAIL PROTECTED]

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>


------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=10426&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to