Author |
|
jlevens
Joined: 29 Aug 2009 Posts: 6 Location: Netherlands
|
Posted: Sat 29 Aug '09 22:19 Post subject: How to install mod_fcgid and perl on Win XP |
|
|
I have been trying to get a script working using mod_fcgid on my Windows XP Pro machine at home.
I'm running apache 2.2.11 (part and parcel of the windows msi download for www.foswiki.org which installs easily for CGI out of the box).
Therefore to add fastcgi support, I found the mod_fcgid.so on this web-site, thanks for that. I copied the mod_fcgid.so into the apache modules directory and restarted apache. However, that would appear not to be enough to get things off the ground.
Therefore, I started looking around the web for answers and found this mixed bag:
References to mod_fastcgi.so and mod_fcgid.so
References to libfcgi.dll
References to mod_fastcgi.dll
Lots of alternative apache configurations
References to compile options and dll manifests
My specific questions at this time are:
Is the mod_fastcgi.dll also required and if so where/how should it be installed? Are there other dependent modules and if so where can I find them? Do I need to concern myself with DLL manifests?
Is the libfcgi.dll a library for C/C++ programming and therefore not relevant as I'm interested in perl?
Despite my best efforts I could not find clear documentation about these points. I have already raised questions on the foswiki web-site, and I have some answers. However, I need these specific questions answering if anybody can help.
Note that although the ultimate goal is to bring up foswiki with fastcgi, I'm testing with this simple script:
Code: |
#!c:\strawberry\perl\bin\perl.exe
use FCGI;
$cnt = 0;
while (FCGI::accept() >= 0)
{
print ("Content-type: text/html\r\n\r\n");
print ("<head>\n<title>FastCGI Demo Page (perl)</title>\n</head>\n");
print ("<h1>FastCGI Demo Page (perl)</h1>\n");
print ("This is coming from a FastCGI server.\n<BR>\n");
print ("Running on <EM>$ENV{USER}</EM> to <EM>$ENV{REMOTE_HOST}</EM>\n<BR>\n");
$cnt++;
print ("This is connection number $cnt\n");
}
|
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 29 Aug '09 23:16 Post subject: |
|
|
I haven't tried perl over fcgid, but it should be same like php over fcgid. So you may take a look at the php fcgid setup at http://www.apachelounge.com/viewtopic.php?t=2684 I guess you can modify that so it works with .pl or .cgi and perl.exe
If you still have a question or an issue please ask again |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sat 29 Aug '09 23:56 Post subject: |
|
|
there's an idea .. I've thought of it but wasn't sure it could be done with fcgid so never tried |
|
Back to top |
|
jlevens
Joined: 29 Aug 2009 Posts: 6 Location: Netherlands
|
Posted: Mon 31 Aug '09 15:21 Post subject: |
|
|
Thanks for your suggestions. I have already been looking around various other mod_fcgid installations including PHP and Ruby. However in the end this was just more and more confusing.
My background is mainframe and technical, I suspect I am making unwarranted assumptions. It is for this reason that I need answers to these specific questions:
Is the mod_fastcgi.dll also required in addition to mod_fcgid.so? If so where/how should it be installed? Are there other dependent modules/dlls and if so where can I find them? Do I need to concern myself with DLL manifests?
Is the libfcgi.dll a library for C/C++ programming and therefore not relevant as I'm interested in perl?
Thanks again |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
mukesh123
Joined: 01 Sep 2009 Posts: 1 Location: Delhi
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 01 Sep '09 22:20 Post subject: Re: Hi |
|
|
mukesh123 wrote: | It helped me a lot to get rid of my problem |
So what's your solution? Please share! |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
jlevens
Joined: 29 Aug 2009 Posts: 6 Location: Netherlands
|
Posted: Sun 06 Sep '09 13:01 Post subject: |
|
|
Thanks for that thought. When I read further on this point, it just means install the appropriate module for your webserver and a fastcgi perl library. I switch to fastcgi from fcgid and when apache comes up the apache monitor reports fastcgi as active, but the script will not run. However, I perservere |
|
Back to top |
|
jlevens
Joined: 29 Aug 2009 Posts: 6 Location: Netherlands
|
Posted: Tue 08 Sep '09 22:26 Post subject: |
|
|
The key reference for mod_fastcgi is here:
http://dev.catalyst.perl.org/wiki/deployment/apache_fastcgi_win32#Install_Apache_FastCGI_module
The specific problem is that the 'stable' 2.4.6 does not work for Win32. The snapshot *binary* provided within this link (which is an =so= not a =dll= like 2.4.6) makes all the difference.
Note that the hacking around process to attempt both fastcgi flavours may mean something else is required. Nonetheless, I am fairly confident that this snapshot (2.4.7 according to notes) mod_fastcgi is the solution in and of itself.
I did not manage to get mod_fcgid working and neither did the author of this article. I do not need mod_fcgid over mod_fastcgi, at least I am not aware enough of the pros and cons. Right now as part of incremental process improvement, fastcgi is the next increment from cgi. An alternate flavour may or may not be the next increment. |
|
Back to top |
|