#30594 [NEW]: Domain socket connections fails
| From: | ville at walveranta dot org | Date: | Thu, 28 Oct 2004 05:20:38 +0000 |
| Subject: | #30594 [NEW]: Domain socket connections fails | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-68419@lists.php.net to get a copy of this message | ||
From: ville at walveranta dot org
Operating system: FreeBSD 4.10-RELEASE-p3
PHP version: 5.0.2
PHP Bug Type: Sockets related
Bug description: Domain socket connections fails
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"
--
Edit bug report at http://bugs.php.net/?id=30594&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30594&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30594&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30594&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30594&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30594&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30594&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30594&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30594&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30594&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30594&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30594&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30594&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30594&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30594&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30594&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30594&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30594&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30594&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30594&r=mysqlcfg