When doing Unix sockets, it might be necessary to chmod the socket file so as to give Write permission to Group and/or Others. Otherwise, only the owner is allowed to write data into the stream.
Example:
<?php
$sockpath = '/tmp/my.sock';
socket_bind($socket, $sockpath);
//here: write-only (socket_send) to others, only owner can fetch data.
chmod($sockpath, 0702);
?>