perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Malcolm J Harwood <mjhlists-modperl-20060...@liminalflux.net>
Subject Re: Perl section and request object
Date Wed, 19 Sep 2007 14:24:11 GMT
On Wednesday 19 September 2007 4:43:25 am antoine7 wrote:

> <Perl>
>         use Apache2::RequestUtil ();
>         my $r = Apache2::RequestUtil->request;
>         [...]
> </Perl>
>
> But when I restart the server I get the following error message
> etch:~# /etc/init.d/apache2 restart
> Forcing reload of web server (apache2)...Syntax error on line 7 of
> /etc/apache2/sites-enabled/999-vhost:
> \t(in cleanup) Global $r object is not available. Set:\n\tPerlOptions
> +GlobalRequest\nin httpd.conf at /etc/apache2/sites-enabled/999-vhost line
> 9.\n
>  failed!
>
> But I've already add PerlOptions +GlobalRequest ...
>
> Has anyone got an idea ?

$r is a request object. It only exists when you're processing a request, so 
you can't use it during startup as there's no active request at that point.

What is it you are trying to do?



Mime
View raw message