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.
unix://自 PHP 3 起可用, udg://自 PHP 5 起可用。
unix://提供了在 Unix 域中对套接字流连接的访问。 udg://提供了替代的传输器以用户数据报协议(UDP)来访问 Unix 域套接字。
Unix 域套接字(UNIX Domain Socket),和 Internet Domain Socket 不同,不期望端口号。在
fsockopen()中
portno
参数应被设为 0。
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.