ID: 29574 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Verified Bug Type: CGI related Operating System: Linux -PHP Version: 5CVS-2004-08-08 (dev) +PHP Version: 5CVS-2005-03-07
Previous Comments: ------------------------------------------------------------------------ [2004-09-12 00:40:46] jeremy at 33ad dot org just a quick note that I've seen this bug also with php 5.0.1 released on Aug 12. I applied the patch and it worked as expected. ------------------------------------------------------------------------ [2004-08-08 19:56:03] [EMAIL PROTECTED] 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 this bug report at http://bugs.php.net/?id=29574&edit=1