note 32064 added to function.proc-close
| From: | sonetti at hotmail dot com | Date: | Thu, 15 May 2003 07:46:28 +0000 |
| Subject: | note 32064 added to function.proc-close | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-48010@lists.php.net to get a copy of this message | ||
I'm using proc_open in combination with 'openssl s_client' to establish a connection
to a SSL server.
After sending and receiving a couple of messages I try to close the pointer with proc_close(), but
this takes for about a whole minute
Part of my script;
[CODE]
<?
$ssl_connection = proc_open("openssl s_client -quiet -connect hostname:port -ssl3",
array(0 => array("pipe", "r"), 1 => array("pipe",
"w")), $pipe);
fwrite($pipe[0], "data to send");
$response = fread($pipe[1], 1024);
$pipe[0] = fclose($pipe[0]);
echo "Pipe[0] closed..\n";
$pipe[1] = fclose($pipe[1]);
echo "Pipe[1] closed..\n";
proc_close($ipay_connection);
echo "Pointer closed";
?>
[/CODE]
The first past goes very quick, I receive a message back from the server within a second, then the
pipe's are closed.. but then it takes for about a minute until "Pointer closed"
appears on the screen and the page finishes loading.
Anybody knows how this can be solved? Or is it just openssl who fails to exit quickly?
--
http://www.php.net/manual/en/function.proc-close.php
http://master.php.net/manage/user-notes.php?action=edit+32064
http://master.php.net/manage/user-notes.php?action=delete+32064
http://master.php.net/manage/user-notes.php?action=reject+32064