Today I had a weird one.
The PHP function named stream_socket_client(), used to create a socket to communicate with another computer over a network, may return $errno = 0 and $errstr = "".
The PHP reference actually mentions the problem:
On failure the errno
and errstr
arguments will be populated with the actual system level error that occurred in the system-level connect() call. 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. ...