Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: Re: Re: 500 Internal Server Error - Using ActiveState perl

by barbie (Deacon)
on Jan 07, 2004 at 14:27 UTC ( #319451=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: Re: 500 Internal Server Error - Using ActiveState perl
in thread 500 Internal Server Error - Using ActiveState perl

Have a look at PerlIS (more commonly known as 'Perl for ISAPI', which comes as part of the default install with ActivePerl) from ActiveState. If you're using IIS then change the shebang line to:

#!/usr/bin/perlis.dll
If you then need to switch to Apache, without changing the shebang line, find the following line in the httpd.conf and ensure it's uncommented:
ScriptInterpreterSource registry
This will ensure you run the script against the Perl binary referenced in the registry and will ignore the shebang line. I use this to switch between IIS and Apache all the time.

--
Barbie | Birmingham Perl Mongers | http://birmingham.pm.org/


Comment on Re: Re: Re: Re: Re: 500 Internal Server Error - Using ActiveState perl
Select or Download Code
Re: Re: Re: Re: Re: Re: 500 Internal Server Error - Using ActiveState perl
by iburrell (Chaplain) on Jan 08, 2004 at 03:39 UTC
    Why do you use perlis.dll in the shebang line? The standard /usr/bin/perl makes much more sense. Wth "ScriptInterpreterSource registry", the shebang line isn't used. If you have perlis.dll for .cgi in the registry, then perlis.dll might work under Apache but there is no benefit over perl.exe. On Unix, perlis.dll doesn't exist unless you make a symlink. Using /usr/bin/perl means you CGI script can run under Apache Win32, Apache Cygwin, Apache Windows, IIS CGI, and IIS ISAPI without changes.
      IIS uses the shebang line, and thus uses PerlIS. Apache reads the httpd.conf and thus uses the registry entry and ignores the shebang line. PerlIS runs ALOT faster with IIS. If you care to follow the link I posted, you'll understand why this is. PerlIS was written by ActiveState to better integrate Perl with IIS.

      Please note the OP mention they were using Windows NOT Unix. What I suggested was applicable to their situation.

      --
      Barbie | Birmingham Perl Mongers | http://birmingham.pm.org/

        Apache reads the httpd.conf and thus uses the registry entry and ignores the shebang line.
        Maybe your copy of apache, but standard apache doesn't perform any such magic. mod_perl maybe, but not apache.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2014-08-23 07:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (172 votes), past polls