ID:               37238
 Updated by:       [EMAIL PROTECTED]
 Reported By:      barborak at basikgroup dot com
-Status:           Assigned
+Status:           Closed
 Bug Type:         IIS related
 Operating System: Windows XP
 PHP Version:      6CVS-2006-04-28 (CVS)
 Assigned To:      edink
 New Comment:

Not quite a year yet, but the patches have been applied :)

Precompiled file can be downloaded from:
http://pecl4win.php.net/download.php/dll/04d5c454937559f3ea031e8051b55625/isapi_fcgi.dll

Thanks!


Previous Comments:
------------------------------------------------------------------------

[2006-05-01 15:39:54] barborak at basikgroup dot com

i've posted the patches here:

http://www.basikgroup.com/temp/fastcgi_isapi_patches.zip

thanks,
mike

------------------------------------------------------------------------

[2006-04-30 22:20:43] [EMAIL PROTECTED]

Could you please post this patch online somewhere?

I'll check it out.

------------------------------------------------------------------------

[2006-04-28 16:30:27] barborak at basikgroup dot com

Description:
------------
(I apologize if I am reporting this in the wrong place. It seems that
Shane Caraveo's fastcgi-isapi module is now being maintained as part of
the PHP project. This is a great DLL for general FastCGI applications
and not just PHP. The problem I found relates to using it with Perl to
run dynamic servers. As such, it's not terribly relevant to your work
but I thought I'd report it along with patches.)

1. When using the fastcgi-isapi DLL to run dynamic servers, the dynamic
servers are running as FastCGI filters rather than responders. This is
due to a structure's member not being initialized.

2. When using perl as the server executable, it is sometimes necessary
to include arguments like -T and -w. The Args value in the registry is
being ignored for dynamic servers.

Here are the patches I applied to the code in CVS to fix these
problems:

--- FCGIProcMgr.cpp     Thu Apr 27 14:46:38 2006
+++ FCGIProcMgr.cpp.new Thu Apr 27 14:45:54 2006
@@ -388,7 +388,10 @@
        proc->incServers = parent->incServers;
        proc->maxServers = parent->maxServers;
        proc->timeout = parent->timeout;
-       if (path) strncpy(proc->args, path, sizeof(proc->args)-1);
+       proc->isFilter = parent->isFilter;
+       *( proc->args ) = 0;
+       if (parent->args) strncpy(proc->args, parent->args,
sizeof(proc->args)-1);
+       if (path) strncpy(proc->args + strlen (proc->args), path,
sizeof(proc->args)-1 - strlen (proc->args) );
        strncpy(proc->bindPath, bindpath, sizeof(proc->bindPath)-1);
        if (dwServerImpersonate) {
                proc->env.putEnv("_FCGI_NTAUTH_IMPERSONATE_=1");

And I also needed this change to compile it on my machine:

--- fcgi_server.h       Thu Apr 27 14:46:38 2006
+++ fcgi_server.h.new   Thu Apr 27 14:43:46 2006
@@ -25,6 +25,10 @@
 #define FCGI_SERVER_VERSION "2.2.2 0.5.2 beta"
 #define FCGI_ENVIRON_VER "FCGI_SERVER_VERSION=" FCGI_SERVER_VERSION

+#if !defined (INVALID_FILE_ATTRIBUTES)
+#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
+#endif
+
 extern void InitiateServers(char *szExtension);
 extern void CheckServers(char *szExtension); 

Given these changes and registry settings like the following, I was
able to successfully run perl dynamic servers with the fastcgi-isapi
module:

HKEY_LOCAL_MACHINE\SOFTWARE\FASTCGI\.pl

In this key, I added the following values:

AppPath REG_SZ c:\tools\perl\5.6.1\bin\MSWin32-x86\perl.exe
Args REG_SZ -T
BindPath REG_SZ

Note that the value of Args is "-T " (with a space). BindPath is empty.
(Perhaps it's not necessary.)





------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37238&edit=1

Reply via email to