note 116423 deleted from function.stream-socket-client by salathe

From: Date: Fri, 02 Jan 2015 11:35:37 +0000
Subject: note 116423 deleted from function.stream-socket-client by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-201340@lists.php.net to get a copy of this message
Note Submitter: Adam Williamson ---- Not sure it's exactly a bug, but errno will be 0 and errstr will be empty if performing an SSL connection and some kind of certificate check fails (in this case, for e.g. CN_match / peer_name). You get a traceback which indicates the real problem: PHP Warning: stream_socket_client(): Peer certificate CN=mail.btinternet.com' did not match expected CN=foo' in blah.php on line XXX but if you've got something which prints errno and errstr, it won't be very useful: ERROR: 0 [empty space where error message would be] This is indistinguishable, AFAICT, from the case this page refers to as "If the value returned in errno is 0 and the function returned FALSE, it is an indication that the error occurred before the connect() call. This is most likely due to a problem initializing the socket."

« previous php.notes (#201340) next »