[Xitami] CGI

Paul Reid xitami@lists.xitami.org
Mon, 24 Mar 2003 10:10:02 -0500


> #! C:\Perl\Bin

> Yes, I do have Perl installed to C:\Perl\Bin, and yes, perl.exe is
> located within that dir.

But the she-bang has to say what PROGRAM, not just what directory.
It needs to say "perl" or "perl.exe". Or maybe MyPearl.COM if you
have built your own script interpreter.

As Axel points out: on DOS/Windows: if you omit the directory or
specify a directory that does not exist, Xitami will attempt to find
the program by name along PATH, which is why "#! perl" will work.
Not all webservers will do this. I don't think Xitami will under
unix.

Also: Xitami often handles DOS-type back-slash directory syntax
correctly, but forward-slash works too and maybe more reliably.
Xitami will translate forward-slash syntax to back-slash on DOS
filesystems, but NT/XP systems actually take / just as well as \.

The most universal she-bang is "#! /usr/bin/perl"

This specifies the full path/program on most unix machines. On a
DOS/Win machine, be sure you do NOT have a /usr/bin/ folder (you
usually won't) and when Xitami fails there it will search along PATH
and find a "perl" to use.

If you must rely on PATH, be sure Perl Install sets it (or you set
it) and you may need to re-boot after Perl install so the PATH
statement is in effect when Xitami starts up.

 -PRR