php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30594 Domain socket connections fails
Submitted: 2004-10-28 07:20 UTC Modified: 2004-11-01 03:17 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: ville at walveranta dot org Assigned:
Status: Not a bug Package: Sockets related
PHP Version: 5.0.2 OS: FreeBSD 4.10-RELEASE-p3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
40 - 25 = ?
Subscribe to this entry?

 
 [2004-10-28 07:20 UTC] ville at walveranta dot org
Description:
------------
UNIX domain socket connection to a daemon socket that is certified to be valid, and to which connection with PHP 4.3.9 can be established without a problem, fails.

The daemon I was testing this with was Bruce Guenter's vmailmgr (http://vmailmgr.org/) but the same problem seemes to occur with any valid domain socket.

PHP 5.0.2 with Apache 1.3.32 produces the error while PHP 4.3.9 with Apache 1.3.32 works ok (PHP code tested on the same system, with otherwise [besides the PHP version] identical configuration).

Reproduce code:
---------------
<?php 
$sockfile = '/usr/tmp/.vmailmgrd'; 
$vmailsock = fsockopen ($sockfile, 0, $errno, $errstr, 20); 
if (!$vmailsock) die("Failed to open unix socket file at '$sockfile'<br>\n Error: $errno - $errstr"); 
?> 


Expected result:
----------------
no output (i.e. $vmailsock is a valid resource)

Actual result:
--------------
Warning: fsockopen() [function.fsockopen]: unable to connect to /usr/tmp/.vmailmgrd:0 (Failed to parse address "/usr/tmp/.vmailmgrd") in /usr/web/site31821/htdocs/testsock.php on line 4 
Failed to open unix socket file at '/usr/tmp/.vmailmgrd' 
Error: 0 - Failed to parse address "/usr/tmp/.vmailmgrd"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-01 03:17 UTC] wez@php.net
http://docs.php.net/en/transports.html

Use "unix://" as a prefix, as has always been documented for fsockopen.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 14:01:28 2024 UTC