Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: How does apache under NT find the perl interpreter?

by Wysardry (Pilgrim)
on Jan 10, 2003 at 23:44 UTC ( [id://225999]=note: print w/replies, xml ) Need Help??


in reply to How does apache under NT find the perl interpreter?

Actually, Apache under NT4 will allow you to use a shebang in the form of:

#!Perl/bin/perl

In other words, you don't need the drive letter if Apache and Perl are on the same drive and NT understands back and forward slashes in paths.

It also helps if you install Perl in a directory called "usr" instead of the default "Perl" so that you don't need to edit the shebang when you upload the script to a UNIX server. ;)

I wish someone had told me that before I installed it. :/

Oh, and the registry option does work, which is handy for running scripts on the command line.

Replies are listed 'Best First'.
Re: Answer: How does apache under NT find the perl interpreter?
by osama (Scribe) on Jan 11, 2003 at 20:29 UTC
    Apache under windows uses the #! line, if a drive letter is ommited it assumes the same drive that apache is installed in, otherwise you need to specify it as in #!d:/perl/bin/perl When I used to install perl/apache on windows I would:
    1. install apache in the default dir "C:\Program Files\Apache" folder.
    2. run apache's command to register service, set start mode for the service to automatic.
    3. install perl in c:\usr
    That way apache runs on every boot, and when you type #!/usr/bin/perl, in a script it just works!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://225999]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-18 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found