#35533 [Opn->Asn]: stream_socket_sendto() does not work with Unix sockets

From: Date: Mon, 02 Jan 2006 08:38:29 +0000
Subject: #35533 [Opn->Asn]: stream_socket_sendto() does not work with Unix sockets
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-91344@lists.php.net to get a copy of this message
 ID:               35533
 Updated by:       sniper@php.net
 Reported By:      mark-phpbugs at vectrex dot org dot uk
-Status:           Open
+Status:           Assigned
 Bug Type:         Sockets related
 Operating System: Linux 2.6, Debian
 PHP Version:      5.1.1
 Assigned To:      pollita
 New Comment:

Sara, are you alive?


Previous Comments:
------------------------------------------------------------------------

[2005-12-25 17:06:14] sniper@php.net

Sara, can you let me know if you're ever going to look into these bug
reports and if I should assign them to someone else?

------------------------------------------------------------------------

[2005-12-21 22:06:12] sniper@php.net

Sara, can you look at this?

------------------------------------------------------------------------

[2005-12-03 18:49:18] mark-phpbugs at vectrex dot org dot uk

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



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35533&edit=1


Thread (10 messages)

« previous php.bugs (#91344) next »