sas             Tue Sep  2 12:16:13 2003 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/sapi/cgi   cgi_main.c 
  Log:
  fetch fd correctly in fastcgi case
  
  
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.190.2.46 php-src/sapi/cgi/cgi_main.c:1.190.2.47
--- php-src/sapi/cgi/cgi_main.c:1.190.2.46      Tue Sep  2 07:23:57 2003
+++ php-src/sapi/cgi/cgi_main.c Tue Sep  2 12:16:12 2003
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: cgi_main.c,v 1.190.2.46 2003/09/02 11:23:57 sas Exp $ */
+/* $Id: cgi_main.c,v 1.190.2.47 2003/09/02 16:16:12 sas Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -491,8 +491,16 @@
 
 static int sapi_cgi_get_fd(int *fd TSRMLS_DC)
 {
+#if PHP_FASTCGI
+       FCGX_Request *request = (FCGX_Request *)SG(server_context);
+       
+       *fd = request->ipcFd;
+       if (*fd >= 0) return SUCCESS;
+       return FAILURE;
+#else
        *fd = STDOUT_FILENO;
        return SUCCESS;
+#endif
 }
 
 static int sapi_cgi_force_http_10(TSRMLS_D)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to