PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

PHP type comparison tables> <List of Supported Socket Transports
Last updated: Fri, 22 Aug 2008

view this page in

Unix Domain: Unix and UDG

unix:// and udg:// (udg:// since PHP 5).

  • unix:///tmp/mysock
  • udg:///tmp/mysock

unix:// provides access to a socket stream connection in the Unix domain. udg:// provides an alternate transport to a Unix domain socket using the user datagram protocol.

Unix domain sockets, unlike Internet domain sockets, do not expect a port number. In the case of fsockopen() the portno parameter should be set to 0.



add a note add a note User Contributed Notes
Unix Domain: Unix and UDG
Matthew Fortune
16-Feb-2007 12:03
It appears that fsockopen prior to php5 did not need the unix:// qualifier when opening a unix domain socket:

php4: fsockopen("/tmp/mysocket"......);

php5: fsockopen("unix:///tmp/mysocket"......);

This caught me out when upgrading.

 
show source | credits | sitemap | contact | advertising | mirror sites