You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Collin Starkweather <co...@collinstarkweather.com> on 2004/07/11 03:03:44 UTC

Apache2 and mod_perl not playing nice

I decided recently to make the change to Apache2.  I normally build
Apache and mod_perl by hand, but since I recently switched to Gentoo
decided to let Gentoo's portage utility, emerge, do the heavy lifting
this time to see how it went.  

After emerging Apache 2.0.49-r1 and mod_perl 1.99.11, I get the
following when trying to fire it up:

  www root # apache2ctl configtest
  Syntax error on line 66 of /usr/lib/apache2/conf/vhosts/vhosts.conf:
  Invalid command 'PerlRequire', perhaps mis-spelled or defined by a \
  module not included in the server configuration
  www root # 

I have checked the perl.apache.org migration documentation and there is
nothing that indicates PerlRequire has been deprecated, and, in fact,
all of the mod_perl directives trigger the error, even ones I know to be
valid such as PerlInitHandler.  The offending virtual host configuration
(edited for brevity), which is for an Apache::Pagekit based site, is

  <VirtualHost *:8088>
     ServerAdmin collin.starkweather@collinstarkweather.com
     ... blah blah blah ...
     DocumentRoot /.../www.collinstarkweather.com/pagekit/View/Default
     PerlRequire /.../www.collinstarkweather.com/scripts/startup.pl
     SetHandler perl-script
     PerlSetVar PKIT_ROOT /.../www.collinstarkweather.com/pagekit
     PerlSetVar PKIT_SERVER staging
     PerlHandler +Apache::PageKit
     <Perl>
       use Apache::PageKit;
       Apache::PageKit->startup("/.../pagekit","staging");
     </Perl>
     PerlInitHandler +Apache::Reload
  </VirtualHost>

I feel like I'm missing something simple but fundamental here.  Any
insights would be greatly appreciated.

Thanks,

-Collin

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Collin Starkweather, Ph.D.  collin.starkweather@collinstarkweather.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Apache2 and mod_perl not playing nice

Posted by Stas Bekman <st...@stason.org>.
Collin Starkweather wrote:
> I decided recently to make the change to Apache2.  I normally build
> Apache and mod_perl by hand, but since I recently switched to Gentoo
> decided to let Gentoo's portage utility, emerge, do the heavy lifting
> this time to see how it went.  
> 
> After emerging Apache 2.0.49-r1 and mod_perl 1.99.11, I get the

Unrelated to the question that Grant has already answered, do yourself a 
favor and use the latest mod_perl, which is 1.99_14.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Apache2 and mod_perl not playing nice

Posted by Grant <em...@yahoo.com>.
--- Collin Starkweather
<co...@collinstarkweather.com> wrote:
> I decided recently to make the change to Apache2.  I
> normally build
> Apache and mod_perl by hand, but since I recently
> switched to Gentoo
> decided to let Gentoo's portage utility, emerge, do
> the heavy lifting
> this time to see how it went.  
> 
> After emerging Apache 2.0.49-r1 and mod_perl
> 1.99.11, I get the
> following when trying to fire it up:
> 
>   www root # apache2ctl configtest
>   Syntax error on line 66 of
> /usr/lib/apache2/conf/vhosts/vhosts.conf:
>   Invalid command 'PerlRequire', perhaps mis-spelled
> or defined by a \
>   module not included in the server configuration
>   www root # 
> 
> I have checked the perl.apache.org migration
> documentation and there is
> nothing that indicates PerlRequire has been
> deprecated, and, in fact,
> all of the mod_perl directives trigger the error,
> even ones I know to be
> valid such as PerlInitHandler.  The offending
> virtual host configuration
> (edited for brevity), which is for an
> Apache::Pagekit based site, is
> 
>   <VirtualHost *:8088>
>      ServerAdmin
> collin.starkweather@collinstarkweather.com
>      ... blah blah blah ...
>      DocumentRoot
> /.../www.collinstarkweather.com/pagekit/View/Default
>      PerlRequire
> /.../www.collinstarkweather.com/scripts/startup.pl
>      SetHandler perl-script
>      PerlSetVar PKIT_ROOT
> /.../www.collinstarkweather.com/pagekit
>      PerlSetVar PKIT_SERVER staging
>      PerlHandler +Apache::PageKit
>      <Perl>
>        use Apache::PageKit;
>       
> Apache::PageKit->startup("/.../pagekit","staging");
>      </Perl>
>      PerlInitHandler +Apache::Reload
>   </VirtualHost>
> 
> I feel like I'm missing something simple but
> fundamental here.  Any
> insights would be greatly appreciated.
> 
> Thanks,
> 
> -Collin

Did you point to your mod_perl.so file like this:

LoadModule perl_module
/usr/lib/apache2-extramodules/mod_perl.so

- Grant


		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html