httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Winter" <>
Subject RE: [users@httpd] Quick CGI Fix
Date Tue, 10 Dec 2002 09:39:34 GMT

The error you're getting is more related to the way in which perl is
being called on your Windows machine...the shebang line which others
have talked about is the first line of the perl script you are running
and is used on *nix to tell apache where perl is installed, and so
apache by default will look for perl in that location...

The error you're getting about the child process is an indication that
perl isn't found where the shebang line in your perl scripts is leading
apache to think it most perl scripts will default to a standard
*nix location.

The simple solution on Windows is to find the line;

ScriptInterpreterSource registry

In httpd.conf and 'un-comment' it...I include below the description form

I suspect that if you do this your problem may well go away..


>From httpd.conf

# Apache parses all CGI scripts for the shebang line by default.
# This comment line, the first line of the script, consists of the
# pound (#) and exclamation (!) followed by the path of the program that

# can execute this specific script.  For a perl script, with perl.exe in
# the C:\Program Files\Perl directory, the shebang line should be:

   #!c:/program files/perl/perl

# Note you _must_not_ indent the actual shebang line, and it must be the
# first line of the file.  Of course, CGI processing must be enabled by 
# the appropriate ScriptAlias or Options ExecCGI directives for the
# or directory in question.
# However, Apache on Windows allows either the Unix behavior above, or
# use the Registry to match files by extention.  The command to execute 
# a file of this type is retrieved from the registry by the same method
# the Windows Explorer would use to handle double-clicking on a file.
# These script actions can be configured from the Windows Explorer View
# 'Folder Options', and reviewing the 'File Types' tab.  Clicking the
# button allows you to modify the Actions, of which Apache 1.3 attempts
# perform the 'Open' Action, and failing that it will try the shebang
# This behavior is subject to change in Apache release 2.0.
# Each mechanism has it's own specific security weaknesses, from the
# to run a program you didn't intend the website owner to invoke, and
# best method is a matter of great debate.
# To enable the this Windows specific behavior (and therefore -disable-
# equivilant Unix behavior), uncomment the following directive:
ScriptInterpreterSource registry
# The directive above can be placed in individual <Directory> blocks or
# .htaccess file, with either the 'registry' (Windows behavior) or
# (Unix behavior) option, and will override this server default option.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message