From: [EMAIL PROTECTED] Operating system: Linux PHP version: 5CVS-2004-08-08 (dev) PHP Bug Type: CGI related Bug description: FastCgi server can't be used with unix domain sockets
Description: ------------ The cgi module does not accept unix domain sockets as parameters to option "-b", as it will be prefixed by ":". This is needed so I don't have to revert to using iptables with owner matching to set access restrictions for local users; but use directory/file permissions. Here's a patch against the latest CVS version to not prepend bindpath with ":" when it looks like a file: Index: sapi/cgi/cgi_main.c =================================================================== RCS file: /repository/php-src/sapi/cgi/cgi_main.c,v retrieving revision 1.256 diff -u -r1.256 cgi_main.c --- sapi/cgi/cgi_main.c 14 Jul 2004 22:30:27 -0000 1.256 +++ sapi/cgi/cgi_main.c 8 Aug 2004 14:53:57 -0000 @@ -1130,7 +1130,7 @@ * path (it's what the fastcgi library expects) */ - if (strchr(bindpath, ':') == NULL) { + if ((strchr(bindpath, ':') == NULL) && (strchr(bindpath, '/') == NULL)) { char *tmp; tmp = malloc(strlen(bindpath) + 2); Reproduce code: --------------- php -b /var/run/fastcgi/php4-someuser Expected result: ---------------- Start a FastCgi server listening on "/var/run/fastcgi/php4-someuser". Actual result: -------------- No server starting as ":/var/run/fastcgi/php4-someuser" is passed to libfcgi. -- Edit bug report at http://bugs.php.net/?id=29574&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29574&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29574&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29574&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29574&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29574&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29574&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29574&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29574&r=support Expected behavior: http://bugs.php.net/fix.php?id=29574&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29574&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29574&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29574&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29574&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29574&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29574&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29574&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29574&r=float