note 32064 rejected from function.proc-close by alindeman

From: Date: Thu, 15 May 2003 11:14:07 +0000
Subject: note 32064 rejected from function.proc-close by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48016@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?

« previous php.notes (#48016) next »