note 116423 added to function.stream-socket-client

From: Date: Wed, 31 Dec 2014 20:08:05 +0000
Subject: note 116423 added to function.stream-socket-client
Groups: php.notes 
Request: Send a blank email to php-notes+get-201286@lists.php.net to get a copy of this message
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." ---- Server IP: 72.52.91.14 Probable Submitter: 184.71.189.90 ---- Manual Page -- http://php.net/manual/en/function.stream-socket-client.php Edit -- https://master.php.net/note/edit/116423 Del: integrated -- https://master.php.net/note/delete/116423/integrated Del: useless -- https://master.php.net/note/delete/116423/useless Del: bad code -- https://master.php.net/note/delete/116423/bad+code Del: spam -- https://master.php.net/note/delete/116423/spam Del: non-english -- https://master.php.net/note/delete/116423/non-english Del: in docs -- https://master.php.net/note/delete/116423/in+docs Del: other reasons-- https://master.php.net/note/delete/116423 Reject -- https://master.php.net/note/reject/116423 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#201286) next »