You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Adam Turoff <ad...@smginc.com> on 1998/03/06 19:14:54 UTC
os-windows/1919: Perl CGI Execution (with solution)
>Number: 1919
>Category: os-windows
>Synopsis: Perl CGI Execution (with solution)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Fri Mar 6 10:20:00 PST 1998
>Last-Modified:
>Originator: adamt@smginc.com
>Organization:
apache
>Release: 1.3b5
>Environment:
WinNT v4sp3
MSVC
Apache 1.3b5
perl 5.004_02 for Win32 binary distribution from CPAN
>Description:
The shebang syntax #! is interpreted by Apache; the standard file association
is ignored (*.pl => c:/perl/bin/perl.exe "*.pl").
Win32 uses file associations in the registry to determine how to make
non-executable files executable (.bat, .cmd, .pl, .tk, .py, etc.).
>How-To-Repeat:
Configure any CGI directory that has a perl script
with a unix style #!/usr/bin/perl as the first line.
>Fix:
Apache will look for a file called /usr/bin/perl (on the default drive,
the same as Apache is installed on). If the perl interpreter is found
there (simply by copying c:/perl/bin/perl.exe to c:/usr/bin/perl) then
Apache will load the perl interpreter and run the CGI script.
This way, CGI scripts can remain mostly unmodified between NT and Unix
hosts (CR/LF transformation may still be needed).
Note that with the 5.004_02 binary distribution, simply copying and renaming the
(8K) interpreter executable from the installed directory into c:/usr/bin
is sufficient. The perl interpreter will find the standard installation
directory and load the required DLLs and perl library files.
The fact that NT does not see an extensionless c:/usr/bin/perl as an
executable file does not matter
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]