Author |
|
mike__b
Joined: 03 Sep 2009 Posts: 4
|
Posted: Thu 03 Sep '09 22:26 Post subject: Apache + mod_fcgid premature end of headers |
|
|
Hi all,
I've installed apache2.2 with mod_fcgid-2.2b-w32 from this site, but have a little trouble configuring. Can anybody please advise.
Here's my conf:
Code: | Listen localhost:4000
<VirtualHost localhost:4000>
Alias /otrs c:/otrs4win/otrs/bin/fcgi-bin/
<Directory c:/otrs4win/otrs/bin/fcgi-bin>
Options +ExecCGI Indexes
AllowOverride None
Order allow,deny
Allow from all
SetHandler fcgid-script
FCGIWrapper "c:/StrawberryPerl/perl/bin/perl.exe" .fpl
</Directory>
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
|
Here's the error I have:
Code: | [Thu Sep 03 22:24:03 2009] [notice] mod_fcgid: call C:/htdocs/fcgi-bin/index.fpl with wrapper c:/StrawberryPerl/perl/bin/perl.exe
[Thu Sep 03 22:24:03 2009] [warn] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error
[Thu Sep 03 22:24:03 2009] [error] [client 127.0.0.1] Premature end of script headers: index.fpl
[Thu Sep 03 22:24:04 2009] [notice] mod_fcgid: call C:/htdocs/fcgi-bin/index.fpl with wrapper c:/StrawberryPerl/perl/bin/perl.exe
[Thu Sep 03 22:24:04 2009] [warn] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error
[Thu Sep 03 22:24:04 2009] [error] [client 127.0.0.1] Premature end of script headers: index.fpl
|
Many thanks in advance!
Mike |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
mike__b
Joined: 03 Sep 2009 Posts: 4
|
Posted: Fri 04 Sep '09 10:39 Post subject: |
|
|
Thanks James for your quick answer. The document you linked to seems a bit dated
The trouble is, the document says "Open Market develops such Perl binaries" but Open Market was bought out in the late 90s or so, and the company who bought them filed bankruptcy in 2003. I guess they don't distribute Perl anymore...
So what I have is StrawberryPerl with the FCGI module installed. The example script which is on the page you linked to does not work, gives the very same issue I posted before with my index.fpl.
Is there anybody using fgcid with perl?
Any help is appreciated!
Regards,
Mike |
|
Back to top |
|
jlevens
Joined: 29 Aug 2009 Posts: 6 Location: Netherlands
|
Posted: Sun 06 Sep '09 23:36 Post subject: |
|
|
I assume you're the same Mike who left a note for me over on foswiki. I tried fastcgi rather fcgid and I've finally got that working. Is mod_fcgid really what you are after or will any fastcgi do? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 07 Sep '09 11:13 Post subject: |
|
|
Is there a binary download from mod_fastcgi for Windows which works with apache 2.2? |
|
Back to top |
|
jlevens
Joined: 29 Aug 2009 Posts: 6 Location: Netherlands
|
Posted: Tue 08 Sep '09 10:08 Post subject: |
|
|
The key reference is here:
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. |
|
Back to top |
|
mike__b
Joined: 03 Sep 2009 Posts: 4
|
Posted: Mon 14 Sep '09 9:50 Post subject: |
|
|
I now have the test script working, but on my real application I get the following error:
Code: |
[Mon Sep 14 09:38:39 2009] [notice] Apache/2.2.13 (Win32) mod_fastcgi/mod_fastcgi-SNAP-0811090952 configured -- resuming normal operations
[Mon Sep 14 09:38:39 2009] [notice] Server built: Aug 6 2009 15:50:50
[Mon Sep 14 09:38:39 2009] [notice] Parent: Created child process 1268
[Mon Sep 14 09:38:40 2009] [notice] Child 1268: Child process is running
[Mon Sep 14 09:38:40 2009] [notice] Child 1268: Acquired the start mutex.
[Mon Sep 14 09:38:40 2009] [notice] Child 1268: Starting 64 worker threads.
[Mon Sep 14 09:38:40 2009] [notice] FastCGI: process manager initialized
[Mon Sep 14 09:38:40 2009] [notice] Child 1268: Starting thread to listen on port 4000.
[Mon Sep 14 09:38:40 2009] [notice] Child 1268: Starting thread to listen on port 80.
[Mon Sep 14 09:46:32 2009] [warn] FastCGI: (dynamic) server "C:/otrs-2.4.4/bin/fcgi-bin/index.fpl" started (pid 3944)
[Mon Sep 14 09:46:33 2009] [warn] FastCGI: (dynamic) server "C:/otrs-2.4.4/bin/fcgi-bin/index.fpl" (pid 3944) terminated with exit with status '9'
[Mon Sep 14 09:46:33 2009] [error] [client 127.0.0.1] (OS 109)The pipe has been ended. : FastCGI: comm with server "C:/otrs-2.4.4/bin/fcgi-bin/index.fpl" aborted: GetOverlappedResult() failed
[Mon Sep 14 09:46:33 2009] [error] [client 127.0.0.1] FastCGI: incomplete headers (0 bytes) received from server "C:/otrs-2.4.4/bin/fcgi-bin/index.fpl"
[Mon Sep 14 09:46:37 2009] [warn] FastCGI: (dynamic) server "C:/otrs-2.4.4/bin/fcgi-bin/index.fpl" restarted (pid 3964)
[Mon Sep 14 09:46:37 2009] [warn] FastCGI: (dynamic) server "C:/otrs-2.4.4/bin/fcgi-bin/index.fpl" (pid 3964) terminated with exit with status '9'
[Mon Sep 14 09:46:42 2009] [warn] FastCGI: (dynamic) server "C:/otrs-2.4.4/bin/fcgi-bin/index.fpl" restarted (pid 3996)
[Mon Sep 14 09:46:43 2009] [warn] FastCGI: (dynamic) server "C:/otrs-2.4.4/bin/fcgi-bin/index.fpl" (pid 3996) terminated with exit with status '9'
|
Could anyone advise?
--
Michiel[/code] |
|
Back to top |
|
BrianK
Joined: 11 Nov 2009 Posts: 1
|
Posted: Thu 12 Nov '09 0:27 Post subject: Apache + mod_fcgid premature end of headers |
|
|
Hello,
Has anyone had any luck with mod_fcgid on Windows Server?
Thanks!
Brian
Software versions:
1. mod_fcgid-2.3.4-win32-x86.zip
2. apache_2.2.14-win32-x86-openssl-0.9.8k.msi
3. Windows Server 2003 R2
Perl foo.pl test is from here:
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
Error.log contains:
[Wed Nov 11 15:57:27 2009] [warn] [client 192.168.21.21] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error
[Wed Nov 11 15:57:27 2009] [error] [client 192.168.21.21] Premature end of script headers: foo.pl
Httpd.conf entries:
LoadModule fcgid_module modules/mod_fcgid.so
Alias /fcgi-bin/ "C:/Apache/fcgi-bin/"
<IfModule fcgid_module>
FcgidConnectTimeout 20
FcgidIOTimeout 48
</IfModule>
# Directives from http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
<Directory "C:/Apache/fcgi-bin">
SetHandler fcgid-script
Options +ExecCGI
# Customize the next two directives for your requirements.
Order allow,deny
Allow from all
</Directory> |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 12 Nov '09 23:16 Post subject: |
|
|
Brian, the simple answer is NO.
I do thank you for taking the time to post this to the httpd dev list. I see it has caught Jeff's eye and maybe, just maybe we can start running perl stuff under mod_fcgid ..... finally.
I have two perl scripts I'd like to run under fcgid since mod_perl simply refuses to play nice with them, which negates my need for mod_perl.
Gregg |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Fri 13 Nov '09 22:30 Post subject: |
|
|
I posted the following on the dev-list
Code: | Hi,
Maybe it is the same issue we had with the origonal mod_fcid 2.2.
We applied a patch to that version, see the info and patches in the .zip at the download at www.apachelounge.com
See also https://issues.apache.org/bugzilla/show_bug.cgi?id=43329
Steffen |
|
|
Back to top |
|