PHP halts after calling non-existing socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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";
 
?>


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux