|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-07-13 16:04 UTC] jani@php.net
[2008-07-21 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 00:00:02 2025 UTC |
Description: ------------ No valid parameter exists for stream_socket_sendto with unix sockets; you can call it but it won't work under any circumstances. Reproduce code: --------------- <?php /* Because we can't open a unix socket without specifying a path, specify a dummy path. Note that we use "0" for flags so it doesn't connect. */ error_reporting(E_ALL); $sockpath = "/tmp/testsocket"; $errno = 0; $errstr = ""; $sock = stream_socket_server("udg://$sockpath", $errno, $errstr, 0 /* Flags*/ ); $msg = "Hello"; stream_socket_sendto($sock, $msg, 0 /* flags */, "udg:///tmp/anothersocket"); ?> Expected result: ---------------- Send a Unix datagram containing "Hello" to socket /tmp/anothersocket Actual result: -------------- Warning: stream_socket_sendto(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/mark/progs/betterforum/site/udgsendtotest.php on line 14 Warning: stream_socket_sendto(): Failed to parse `udg:///tmp/anothersocket' into a valid network address in /home/mark/progs/betterforum/site/udgsendtotest.php on line 14