After calling a non existing socket PHP halts and doesn't return. It
happens when we do it through our web server (AppWeb) or through the
command line. The problem is with socket_recvfrom. (see code below)
 
Is this a known bug? a mistake I make in accessing sockets? installation
error on my side?
 
Thanks.
 
 
Code:
<?php
 
unlink ("/tmp/local_domain");
$addr = "/tmp/main_adaptor_sock";
$socket = socket_create(AF_UNIX, SOCK_DGRAM, 0);
 
if (!$socket)
  echo "problem in creating socket";
 
if (!socket_bind($socket, "/tmp/local_domain"))
  echo "problem in binding socket";
       
$buffer = "Update";
 
socket_sendto($socket, $buffer, strlen($buffer), 0, $addr);
 
socket_recvfrom($socket, $buffer, 100, 0, $from);
 
       
echo "message recv $buffer \n";
 
?>

Reply via email to