You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Pramod Sokke <pr...@investools.com> on 2000/08/01 23:14:57 UTC

Re: mod_perl success!

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

Re: mod_perl success!

Posted by yusun <yu...@atwell.co.jp>.
No, it is no problem.
I have run it.
You can test it.

----- Original Message -----
From: "Razvan Ionescu" <ra...@aspec.ro>
To: "Razvan Ionescu" <ra...@aspec.ro>
Cc: <mo...@apache.org>
Sent: Thursday, August 03, 2000 10:46 PM
Subject: Re: mod_perl success!


> ups again, i meant $key
>
> a working code for this "keys" loop would be
>
> foreach $key (sort(keys %ENV)) {
>
>                             print "$key = $ENV{$key}\n";
>  }
>
> anyway you can write it shorter but you'll have problems when debuging.
>
> Razvan
>
> > ----- Original Message -----
> > From: "yusun" <yu...@atwell.co.jp>
> > To: "Andrew Chen" <ac...@cobaltgroup.com>
> > Cc: <mo...@apache.org>
> > Sent: Wednesday, August 02, 2000 3:50 PM
> > Subject: Re: mod_perl success!
> >
> >
> > > 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
> > > yusun@atwell.co.jp
> > >
> > >
> > > ----- Original Message -----
> > > From: "Andrew Chen" <ac...@cobaltgroup.com>
> > > To: "Pramod Sokke" <pr...@investools.com>
> > > Cc: <mo...@apache.org>
> > > 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
> > > > achen@cobaltgroup.com
> > > > 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
> > > > >
> > > >
> > >
> >
>


Re: mod_perl success!

Posted by Razvan Ionescu <ra...@aspec.ro>.
ups again, i meant $key

a working code for this "keys" loop would be

foreach $key (sort(keys %ENV)) {

                            print "$key = $ENV{$key}\n";
 }

anyway you can write it shorter but you'll have problems when debuging.

Razvan

> ----- Original Message -----
> From: "yusun" <yu...@atwell.co.jp>
> To: "Andrew Chen" <ac...@cobaltgroup.com>
> Cc: <mo...@apache.org>
> Sent: Wednesday, August 02, 2000 3:50 PM
> Subject: Re: mod_perl success!
>
>
> > 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
> > yusun@atwell.co.jp
> >
> >
> > ----- Original Message -----
> > From: "Andrew Chen" <ac...@cobaltgroup.com>
> > To: "Pramod Sokke" <pr...@investools.com>
> > Cc: <mo...@apache.org>
> > 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
> > > achen@cobaltgroup.com
> > > 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
> > > >
> > >
> >
>


Re: mod_perl success!

Posted by Razvan Ionescu <ra...@aspec.ro>.
it seems to me you should write $keys

Razvan
----- Original Message -----
From: "yusun" <yu...@atwell.co.jp>
To: "Andrew Chen" <ac...@cobaltgroup.com>
Cc: <mo...@apache.org>
Sent: Wednesday, August 02, 2000 3:50 PM
Subject: Re: mod_perl success!


> 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
> yusun@atwell.co.jp
>
>
> ----- Original Message -----
> From: "Andrew Chen" <ac...@cobaltgroup.com>
> To: "Pramod Sokke" <pr...@investools.com>
> Cc: <mo...@apache.org>
> 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
> > achen@cobaltgroup.com
> > 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
> > >
> >
>


Re: mod_perl success!

Posted by yusun <yu...@atwell.co.jp>.
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
yusun@atwell.co.jp


----- Original Message -----
From: "Andrew Chen" <ac...@cobaltgroup.com>
To: "Pramod Sokke" <pr...@investools.com>
Cc: <mo...@apache.org>
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
> achen@cobaltgroup.com
> 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
> >
>


Re: mod_perl success!

Posted by Andrew Chen <ac...@cobaltgroup.com>.
It's actually:

PerlSetVar PerlRunOnce On

(that's without the handler, of course. With it you want that off)

Andrew Chen
Intern, Architecture
achen@cobaltgroup.com
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
>