PHP 8.5.0 Alpha 1 available for testing

Voting

: seven plus two?
(Example: nine)

The Note You're Voting On

tigger (AT) tiggerswelt d0t net
18 years ago
As already mentioned above:

stream_socket_enable_crypto is likely to fail/return zero if the socket is in non-blocking mode.

You may either wait some seconds until all neccessary data has arrived or switch temporary to blocking mode:

<?PHP

stream_set_blocking
($fd, true);
stream_socket_enable_crypto ($fd, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
stream_set_blocking ($fd, false);

?>

This works very fine for me ;-)

<< Back to user notes page

To Top