#40758 [Asn->Fbk]: Test fcgi_is_fastcgi() is wrong on windows
| From: | dmitry@php.net | Date: | Fri, 09 Mar 2007 13:36:15 +0000 |
| Subject: | #40758 [Asn->Fbk]: Test fcgi_is_fastcgi() is wrong on windows | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-110141@lists.php.net to get a copy of this message | ||
ID: 40758
Updated by: dmitry@php.net
Reported By: jostb2345 at yahoo dot com
-Status: Assigned
+Status: Feedback
Bug Type: CGI related
Operating System: Windows (all versions)
PHP Version: 5.2.1
Assigned To: dmitry
New Comment:
I don't see any difference with old code. See OS_IsFcgi() and
OS_LibInit().
Also I don't understand for what reason some program passes stdout to
PHP.
Previous Comments:
------------------------------------------------------------------------
[2007-03-08 13:45:33] jostb2345 at yahoo dot com
Description:
------------
On windows, php 5.2.0 and above the following code (written in
pseudo-code) doesn't work anymore:
socket = socket(AF_INET, ...);
bind(socket, ...);
listen(socket, ...);
outputHandle=GetStdHandle(...);
inputHandle=socket;
CreateProcess(...,"php-cgi.exe", ..., IOHandles);
The problem is that "is_fastcgi" is only set if the OutputHandle and
ErrorHandle are invalid. If both are invalid, InputHandle is assumed to
be a named pipe.
The Unix version still uses the old (correct) code.
To correct this problem either the old FCGI_isfcgi() should be used or
the test must be dublicated. See procedures:
int fcgi_init(void);
int fcgi_is_fastcgi(void);
Regards,
Jost Boekemeier
Reproduce code:
---------------
See above. If necessary I can provide a test program.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40758&edit=1