Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The answer would be to use instead <code>stream_socket_client</code> with the flag <code>STREAM_CLIENT_ASYNC_CONNECT</code>; however there seems to be some bug with SSL:</p> <pre><code>&lt;?php $socket = stream_socket_client( 'ssl://197.136.197.92:443', $errno, $errstr, 3, // timeout should be ignored when ASYNC STREAM_CLIENT_ASYNC_CONNECT ); if (!$socket) { echo "errno = ".$errno."\nerrstr = ".$errstr."\n"; exit; } </code></pre> <p>On Linux there seems to be an infinite loop with:</p> <pre><code>write(3, "\26\3\1\0o\1\0\0k\3\1L\325w/\337u\343uV\341\365}H\331\21k\313\341Q\f\356\""..., 116) = -1 EAGAIN (Resource temporarily unavailable) </code></pre> <p>On some BSD variant on <a href="http://codepad.viper-7.com/" rel="nofollow">http://codepad.viper-7.com/</a> :</p> <pre><code>&lt;br /&gt; &lt;b&gt;Warning&lt;/b&gt;: stream_socket_client() [&lt;a href='function.stream-socket-client'&gt;function.stream-socket-client&lt;/a&gt;]: SSL: connection timeout in &lt;b&gt;/tmp/cpQ8Gv7B&lt;/b&gt; on line &lt;b&gt;9&lt;/b&gt;&lt;br /&gt; &lt;br /&gt; &lt;b&gt;Warning&lt;/b&gt;: stream_socket_client() [&lt;a href='function.stream-socket-client'&gt;function.stream-socket-client&lt;/a&gt;]: Failed to enable crypto in &lt;b&gt;/tmp/cpQ8Gv7B&lt;/b&gt; on line &lt;b&gt;9&lt;/b&gt;&lt;br /&gt; &lt;br /&gt; &lt;b&gt;Warning&lt;/b&gt;: stream_socket_client() [&lt;a href='function.stream-socket-client'&gt;function.stream-socket-client&lt;/a&gt;]: unable to connect to ssl://197.136.197.92:443 (Unknown error) in &lt;b&gt;/tmp/cpQ8Gv7B&lt;/b&gt; on line &lt;b&gt;9&lt;/b&gt;&lt;br /&gt; errno = 115 errstr = </code></pre> <p>See also <a href="http://bugs.php.net/bug.php?id=49295" rel="nofollow">bug #49295</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload