Re: Perl scripts for Unix on my windows machine
From: Purl Gurl (purlgurl_at_purlgurl.net)
Date: 10/17/03
- Next message: Bill: "regex @a = m / | /g and captures?"
- Previous message: James Willmore: "Re: A New bie's doubt"
- In reply to: Bob X: "Re: Perl scripts for Unix on my windows machine"
- Next in thread: Tad McClellan: "Re: Perl scripts for Unix on my windows machine"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 17 Oct 2003 08:56:45 -0700
Bob X wrote:
> Michael P. Broida wrote:
> > James Willmore wrote:
(snipped)
> > I've had that line in many of my Windows Perl scripts and
> > had NO problems with it. Windows doesn't use that line
> > in any way at all, so it's just another comment line.
> Not entirely true. If you are using Apache on Windows, Apache uses that line
> when calling CGI scripts. May not be true for all but I have to put "#!perl"
> on the first line of my cgi's.
Yes, a Perl Perl Land urban myth perpetrated by the inexperienced.
A shebang line is a must for Perl cgi applications under Win32.
This shebang line must be #!perl as you state, or an explicit
path to your perl executable.
Use of #!perl parses according to an environment path variable
set by loading of an autoexec.bat during boot. This path variable
is set during default installation of Apache, well almost always.
I have experienced problems with Apache installations failing to
modify my autoexec.bat during installation. Hand entry works well.
An explicit path works nice for switching perl versions,
#!c:/apache/bin/perl.exe
#!c:/apache/bin/perl561.exe
#!c:/apache2/perl/bin/perl580.exe
For those installing Apache in the future, for trivia, should
you install a newer version of Apache and direct the installer
to install to a different directory than your current Apache,
this will not work. Regardless of what path you enter for the
Apache installer, the installation will overwrite your current
Apache installation. Trying to install to different drive will
not prevent this installation error.
This is a serious programming error with the Apache installer.
Only extensive editing of your Win registry will prevent this.
Apache 2.x installations will exhibit so many bugs under Win32,
you will eventually have to remove it and return to earlier
versions of Apache, unless you enjoy dozens of Perl zombies
and enjoy features of Apache 2.x which simply do not work,
along with Apache 2.x itself becoming a zombie.
Apache 1.3.27 and 1.3.28 will spam your error log with,
"warn [2] exec() may not be safe"
Setting a different error log level will not defeat this.
That message will be generated for every single request
made to your server. In a short time, your error log
is megabytes of those entries. This problem has never
been corrected in the Apache 1.3.x series. Apache 1.3.26
is the last version of Apache which can be used without
inflicting serious problems.
Only cure is to hack your ApacheCore.dll to prevent those
warning messages from being written although CPU time is
still wasted processing this programming error.
Yes, a shebang line is needed and yes there are those who
exhibit a lack of experience in their advice.
Bob's comments are quite correct.
Purl Gurl
-- Play Poker! Play Blackjack! http://www.purlgurl.net/~callgirl/android/poker.cgi http://www.purlgurl.net/~callgirl/android/blakjack.cgi
- Next message: Bill: "regex @a = m / | /g and captures?"
- Previous message: James Willmore: "Re: A New bie's doubt"
- In reply to: Bob X: "Re: Perl scripts for Unix on my windows machine"
- Next in thread: Tad McClellan: "Re: Perl scripts for Unix on my windows machine"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|