I have got same questions in stackoverflow and tried all answers but no help. I am not getting what is the error.
Here is my function that i am using:
When you are trying to write to the socket. If something goes wrong, fwrite will return false or 0 (depending on the php version) as the return value. When it happens, you must manage it.
For the above issue the reason is pretty simple: when SSL_Write returns with SSL_ERROR_WANT_WRITE or SSL_ERROR_WANT_READ, you have to repeat the call to SSL_write with the same parameters again, after the condition is satisfied (read/write available on the socket).
Calling it with different parameters, will yield the 1409F07F bad write retry error.