|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35533 stream_socket_sendto() does not work with Unix sockets
Submitted: 2005-12-03 18:49 UTC Modified: 2008-07-21 01:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mark-phpbugs at vectrex dot org dot uk Assigned: pollita (profile)
Status: No Feedback Package: Streams related
PHP Version: 5.1.1 OS: Linux 2.6, Debian
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: mark-phpbugs at vectrex dot org dot uk
New email:
PHP Version: OS:


 [2005-12-03 18:49 UTC] mark-phpbugs at vectrex dot org dot uk
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:
	/* 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
	$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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 03:01:33 2024 UTC