Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 86111 invoked from network); 19 Sep 2007 10:00:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Sep 2007 10:00:53 -0000 Received: (qmail 74385 invoked by uid 500); 19 Sep 2007 10:00:40 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 74364 invoked by uid 500); 19 Sep 2007 10:00:40 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 74351 invoked by uid 99); 19 Sep 2007 10:00:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 03:00:40 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of deepfryed@gmail.com designates 64.233.182.184 as permitted sender) Received: from [64.233.182.184] (HELO nf-out-0910.google.com) (64.233.182.184) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 10:00:37 +0000 Received: by nf-out-0910.google.com with SMTP id k4so129971nfd for ; Wed, 19 Sep 2007 03:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=mhBM+mTawm8yXniYFKbztNkcKDOSFT9k12QOa7pSPUc=; b=EXr2U3MjNvxU4iU0geHqIidMoc7Q3dF6LUcg3ab7srrloN/WlKVsNCbqS/HMnp15P7J99t3irQhOBFZr3wvYRVYerWMlz1nC0BIhSqP4yKijioFeM/vGgnL1HpqRav0Wj0lhKnhc5WUErEm3Hq1+zlWeny+msyQ/zCfnu/lBarE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=L0vtEd1dzAt6w6iJ8PiediGl+EvWifwslGY8E4HiKP8tcO2U91eQmCTJ+vsCpBb4bAvAkSmkaknqaSRq5RJbqrvbJRrdk8DjxoZ20ifN7iPWwBe7DYoLk/h5Qk8Snwg6HXtj5Uwmqe0PSQvIDInPV6xiPYKqXg/XsUPAQccqJaI= Received: by 10.78.200.3 with SMTP id x3mr187684huf.1190196015316; Wed, 19 Sep 2007 03:00:15 -0700 (PDT) Received: by 10.78.174.19 with HTTP; Wed, 19 Sep 2007 03:00:15 -0700 (PDT) Message-ID: <70b2ff110709190300h454fb050jbc2597bee5f8e5f5@mail.gmail.com> Date: Wed, 19 Sep 2007 20:00:15 +1000 From: "bharanee rathna" To: antoine7 Subject: Re: Perl section and request object Cc: modperl@perl.apache.org In-Reply-To: <12773009.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_23792_30194669.1190196015267" References: <12773009.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_23792_30194669.1190196015267 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline me thinks that PerlOptions +GlobalRequest should be inside your or section. http://perl.apache.org/docs/2.0/user/config/config.html#mod_perl_Directives_Argument_Types_and_Allowed_Location On 9/19/07, antoine7 wrote: > > > Hello, > > I'm new to mod perl, I've setup an apache2 / MP2 on an linux debian etch > server. > I want to access in my apache conf to the HTML Request Header Host: > > I've written this code : > > NameVirtualHost 192.168.1.203 > UseCanonicalName Off > > PerlOptions +GlobalRequest > > > use Apache2::RequestUtil (); > my $r = Apache2::RequestUtil->request; > [...] > > > 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 ? > > Thanks > -- > View this message in context: > http://www.nabble.com/Perl-section-and-request-object-tf4479522.html#a12773009 > Sent from the mod_perl - General mailing list archive at Nabble.com. > > ------=_Part_23792_30194669.1190196015267 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline me thinks that PerlOptions +GlobalRequest should be inside your <Directory> or  <Location> section.

http://perl.apache.org/docs/2.0/user/config/config.html#mod_perl_Directives_Argument_Types_and_Allowed_Location



On 9/19/07, antoine7 < antoine@7enlocation.com> wrote:

Hello,

I'm new to mod perl, I've setup an apache2 / MP2 on an linux debian etch
server.
I want to access in my apache conf to the HTML Request Header Host:

I've written this code :

NameVirtualHost 192.168.1.203
UseCanonicalName Off

PerlOptions +GlobalRequest

<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 ?

Thanks
--
View this message in context: http://www.nabble.com/Perl-section-and-request-object-tf4479522.html#a12773009
Sent from the mod_perl - General mailing list archive at Nabble.com.


------=_Part_23792_30194669.1190196015267--