Discussion:
Executing .cgi scripts
(too old to reply)
Richard Griffin
2006-09-22 19:27:33 UTC
Permalink
Hello,
I am stuck! I have a web developer that like to write cgi scripts but they
will not run on my we server- NW65sp4a, Apache 2.0.54, Perl 5.8.4 mod_perl
1.99_12 Perl scripts run fine but if I try to load a script with .cgi
(including simple test sample that should run) I get the following in the
Apache error log:

[Fri Sep 22 14:14:33 2006] [error] [client 172.16.63.243] Could not find a
command associated with the cgi extension
[Fri Sep 22 14:14:33 2006] [error] [client 172.16.63.243] (4)Bad file
number: don't know how to spawn child process:
general:/htdocs/cgi-bin/test.cgi

Here's what I have for my Perl/CGI config:

<IfModule mod_cgi.c>
CGIMapExtension sys:/perl/Perlcgi/perlcgi.nlm .pl .cgi
</IfModule>
AddHandler cgi-script .pl .cgi
<Files ~ "\.pl$">
Options +ExecCGI
</Files>
ScriptAlias /cgi-bin/ "general:/htdocs/cgi-bin/"
<Directory "general:htdocs/cgi-bin">
AllowOverride None
Options +ExecCGI
AddHandler cgi-script .pl .cgi
Order allow,deny
Allow from all
</Directory>

Where am I going wrong? Thanks,
Richard G.
Guenter
2006-09-23 02:43:50 UTC
Permalink
Hi Richard,
Post by Richard Griffin
Hello,
I am stuck! I have a web developer that like to write cgi scripts but they
will not run on my we server- NW65sp4a, Apache 2.0.54, Perl 5.8.4 mod_perl
1.99_12 Perl scripts run fine but if I try to load a script with .cgi
(including simple test sample that should run) I get the following in the
[Fri Sep 22 14:14:33 2006] [error] [client 172.16.63.243] Could not find a
command associated with the cgi extension
[Fri Sep 22 14:14:33 2006] [error] [client 172.16.63.243] (4)Bad file
general:/htdocs/cgi-bin/test.cgi
<IfModule mod_cgi.c>
CGIMapExtension sys:/perl/Perlcgi/perlcgi.nlm .pl .cgi
</IfModule>
AddHandler cgi-script .pl .cgi
<Files ~ "\.pl$">
Options +ExecCGI
</Files>
ScriptAlias /cgi-bin/ "general:/htdocs/cgi-bin/"
<Directory "general:htdocs/cgi-bin">
AllowOverride None
Options +ExecCGI
AddHandler cgi-script .pl .cgi
Order allow,deny
Allow from all
</Directory>
hmm, I think there was something that you have to use single statements
instead of the combined ones - at least with CGIMapExtension....

Guenter.

Continue reading on narkive:
Loading...