I have installed the mod_perl and changed the httpd.conf as you said.
But when I used the following CGI to test whether the mod_perl was working
or not.
The report was no. Why?

#!/usr/bin/perl
print "Content-type: text/plain\n\n";
  print "Server's environment\n";
  foreach ( keys %ENV ) {
      print "$_\t$ENV{$_}\n";
  }
#####

The result is
     :
     :
GATEWAY_INTERFACE CGI/1.1
     :

It means that I have configured this location to run under mod_cgi and not
mod_perl.
How can I configure the location to run under mod_perl?
Thanks!


Yu Sun
[EMAIL PROTECTED]


----- Original Message -----
From: "Andrew Chen" <[EMAIL PROTECTED]>
To: "Pramod Sokke" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, August 02, 2000 8:18 AM
Subject: Re: mod_perl success!


> It's actually:
>
> PerlSetVar PerlRunOnce On
>
> (that's without the handler, of course. With it you want that off)
>
> Andrew Chen
> Intern, Architecture
> [EMAIL PROTECTED]
> 206-219-8445
> The Cobalt Group, Inc.
>
> On Tue, 1 Aug 2000, Pramod Sokke wrote:
>
> > Where did you set your PerlRunOnce option? I tried setting it in
httpd.conf
> > like this:
> >
> > Alias /cgi-perl/ /usr/ns-home/cgi-bin/
> > <Location /cgi-perl/>
> >         #AllowOverride None
> >         SetHandler perl-script
> >         PerlHandler Apache::PerlRun
> >         Options +ExecCGI
> >         allow from all
> >         PerlSendHeader On
> >         PerlRunOnce On
> > </Location>
> >
> > and I got this error:
> >
> > Invalid command 'PerlRunOnce', perhaps mis-spelled or defined by a
module
> > not included in the server configuration.
> >
> > -Pramod
> >
> > At 04:25 PM 7/25/00 -0700, Andrew Chen wrote:
> > >On Tue, 25 Jul 2000, Pramod Sokke wrote:
> > >
> > >> Andrew,
> > >> >From your discussion on the forum, I recall you mentioning the
differences
> > >> between PerlRunOnce being 'On' and 'Off'. Since our code is extremely
> > >> shabby and huge, will I be able to use it with 'Off'? If I don't,
will I be
> > >> compromising on the speed?
> > >>
> > >> Thanks again for the great detailed write-up!
> > >> -Pramod
> > >
> > >If PerlRunOnce is On, then you can use your code without any changes,
even
> > >if it is completely horrible. PerlRunOnce Off allows for bigger speed
> > >increases, but then you have to write the handler.
> > >
> > >If you just want a really quick speed improvement, stick it on PerlRun
> > >with PerlRunOnce On and see if that's sufficient.
> > >
> > >If you feel like writing the handler (so that you can get a really big
> > >speed boost) then you can run it with PerlRunOnce Off.
> > >
> > >Andrew
> >
>

Reply via email to