Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Problem with Catalyst 5.8 and mod_perl 2

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


lin.support at gmail

Jul 29, 2012, 7:10 AM

Post #1 of 7 (725 views)
Permalink
Problem with Catalyst 5.8 and mod_perl 2

Hi,

I am using catalyst with apache+mod_perl.

I have setup mod_geoip in Apache which creates environment variable
GEOIP_COUNTRY_CODE
I am not able to get this variable in catalyst controller, I have tried
getting it form %ENV.

I checked $c->engine->env but this is undef.

Can someone guide me on this?

Thanks


pjf at roxsoft

Jul 29, 2012, 7:27 AM

Post #2 of 7 (705 views)
Permalink
Re: Problem with Catalyst 5.8 and mod_perl 2 [In reply to]

On 29/07/12 15:10, linuxsupport wrote:
> I have setup mod_geoip in Apache which creates environment variable
> GEOIP_COUNTRY_CODE
> I am not able to get this variable in catalyst controller, I have tried
> getting it form %ENV.

Have you specified Passenv?

http://httpd.apache.org/docs/current/mod/mod_env.htm

--

Regards

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


lin.support at gmail

Jul 29, 2012, 7:48 AM

Post #3 of 7 (703 views)
Permalink
Re: Problem with Catalyst 5.8 and mod_perl 2 [In reply to]

Yes

PassEnv GEOIP_COUNTRY_CODE

I dumped the %ENV, and got following

[debug] $VAR1 = 'PATH';

$VAR2 = '/sbin:/usr/sbin:/bin:/usr/bin';

$VAR3 = 'MOD_PERL_API_VERSION';

$VAR4 = 2;

$VAR5 = 'MOD_PERL';

$VAR6 = 'mod_perl/2.0.4';

On Sun, Jul 29, 2012 at 7:57 PM, Peter Flanigan <pjf [at] roxsoft> wrote:

> On 29/07/12 15:10, linuxsupport wrote:
> > I have setup mod_geoip in Apache which creates environment variable
> > GEOIP_COUNTRY_CODE
> > I am not able to get this variable in catalyst controller, I have tried
> > getting it form %ENV.
>
> Have you specified Passenv?
>
> http://httpd.apache.org/docs/current/mod/mod_env.htm
>
> --
>
> Regards
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>


i at h2l

Jul 29, 2012, 8:09 AM

Post #4 of 7 (705 views)
Permalink
Re: Problem with Catalyst 5.8 and mod_perl 2 [In reply to]

http://perl.apache.org/docs/2.0/user/config/config.html#C_modperl_
modperl doesn't set %ENV like CGI be default. you can use PerlPassEnv.

On Sun, Jul 29, 2012 at 11:48 PM, linuxsupport <lin.support [at] gmail> wrote:
> Yes
>
> PassEnv GEOIP_COUNTRY_CODE
>
> I dumped the %ENV, and got following
>
> [debug] $VAR1 = 'PATH';
>
> $VAR2 = '/sbin:/usr/sbin:/bin:/usr/bin';
>
> $VAR3 = 'MOD_PERL_API_VERSION';
>
> $VAR4 = 2;
>
> $VAR5 = 'MOD_PERL';
>
> $VAR6 = 'mod_perl/2.0.4';
>
>
> On Sun, Jul 29, 2012 at 7:57 PM, Peter Flanigan <pjf [at] roxsoft> wrote:
>>
>> On 29/07/12 15:10, linuxsupport wrote:
>> > I have setup mod_geoip in Apache which creates environment variable
>> > GEOIP_COUNTRY_CODE
>> > I am not able to get this variable in catalyst controller, I have tried
>> > getting it form %ENV.
>>
>> Have you specified Passenv?
>>
>> http://httpd.apache.org/docs/current/mod/mod_env.htm
>>
>> --
>>
>> Regards
>>
>> _______________________________________________
>> List: Catalyst [at] lists
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive:
>> http://www.mail-archive.com/catalyst [at] lists/
>> Dev site: http://dev.catalyst.perl.org/
>
>
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


lin.support at gmail

Jul 29, 2012, 8:18 AM

Post #5 of 7 (702 views)
Permalink
Re: Problem with Catalyst 5.8 and mod_perl 2 [In reply to]

I tried PerlPassEnv GEOIP_COUNTRY_CODE
but still not getting it in %ENV

On Sun, Jul 29, 2012 at 8:39 PM, Hailin Hu <i [at] h2l> wrote:

> http://perl.apache.org/docs/2.0/user/config/config.html#C_modperl_
> modperl doesn't set %ENV like CGI be default. you can use PerlPassEnv.
>
> On Sun, Jul 29, 2012 at 11:48 PM, linuxsupport <lin.support [at] gmail>
> wrote:
> > Yes
> >
> > PassEnv GEOIP_COUNTRY_CODE
> >
> > I dumped the %ENV, and got following
> >
> > [debug] $VAR1 = 'PATH';
> >
> > $VAR2 = '/sbin:/usr/sbin:/bin:/usr/bin';
> >
> > $VAR3 = 'MOD_PERL_API_VERSION';
> >
> > $VAR4 = 2;
> >
> > $VAR5 = 'MOD_PERL';
> >
> > $VAR6 = 'mod_perl/2.0.4';
> >
> >
> > On Sun, Jul 29, 2012 at 7:57 PM, Peter Flanigan <pjf [at] roxsoft>
> wrote:
> >>
> >> On 29/07/12 15:10, linuxsupport wrote:
> >> > I have setup mod_geoip in Apache which creates environment variable
> >> > GEOIP_COUNTRY_CODE
> >> > I am not able to get this variable in catalyst controller, I have
> tried
> >> > getting it form %ENV.
> >>
> >> Have you specified Passenv?
> >>
> >> http://httpd.apache.org/docs/current/mod/mod_env.htm
> >>
> >> --
> >>
> >> Regards
> >>
> >> _______________________________________________
> >> List: Catalyst [at] lists
> >> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> >> Searchable archive:
> >> http://www.mail-archive.com/catalyst [at] lists/
> >> Dev site: http://dev.catalyst.perl.org/
> >
> >
> >
> > _______________________________________________
> > List: Catalyst [at] lists
> > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> > Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> > Dev site: http://dev.catalyst.perl.org/
> >
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>


i at h2l

Jul 29, 2012, 8:34 AM

Post #6 of 7 (694 views)
Permalink
Re: Problem with Catalyst 5.8 and mod_perl 2 [In reply to]

Are you sure GEOIP_COUNTRY_CODE does exist?

On Mon, Jul 30, 2012 at 12:18 AM, linuxsupport <lin.support [at] gmail> wrote:
> I tried PerlPassEnv GEOIP_COUNTRY_CODE
> but still not getting it in %ENV
>
>
> On Sun, Jul 29, 2012 at 8:39 PM, Hailin Hu <i [at] h2l> wrote:
>>
>> http://perl.apache.org/docs/2.0/user/config/config.html#C_modperl_
>> modperl doesn't set %ENV like CGI be default. you can use PerlPassEnv.
>>
>> On Sun, Jul 29, 2012 at 11:48 PM, linuxsupport <lin.support [at] gmail>
>> wrote:
>> > Yes
>> >
>> > PassEnv GEOIP_COUNTRY_CODE
>> >
>> > I dumped the %ENV, and got following
>> >
>> > [debug] $VAR1 = 'PATH';
>> >
>> > $VAR2 = '/sbin:/usr/sbin:/bin:/usr/bin';
>> >
>> > $VAR3 = 'MOD_PERL_API_VERSION';
>> >
>> > $VAR4 = 2;
>> >
>> > $VAR5 = 'MOD_PERL';
>> >
>> > $VAR6 = 'mod_perl/2.0.4';
>> >
>> >
>> > On Sun, Jul 29, 2012 at 7:57 PM, Peter Flanigan <pjf [at] roxsoft>
>> > wrote:
>> >>
>> >> On 29/07/12 15:10, linuxsupport wrote:
>> >> > I have setup mod_geoip in Apache which creates environment variable
>> >> > GEOIP_COUNTRY_CODE
>> >> > I am not able to get this variable in catalyst controller, I have
>> >> > tried
>> >> > getting it form %ENV.
>> >>
>> >> Have you specified Passenv?
>> >>
>> >> http://httpd.apache.org/docs/current/mod/mod_env.htm
>> >>
>> >> --
>> >>
>> >> Regards
>> >>
>> >> _______________________________________________
>> >> List: Catalyst [at] lists
>> >> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> >> Searchable archive:
>> >> http://www.mail-archive.com/catalyst [at] lists/
>> >> Dev site: http://dev.catalyst.perl.org/
>> >
>> >
>> >
>> > _______________________________________________
>> > List: Catalyst [at] lists
>> > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> > Searchable archive:
>> > http://www.mail-archive.com/catalyst [at] lists/
>> > Dev site: http://dev.catalyst.perl.org/
>> >
>>
>> _______________________________________________
>> List: Catalyst [at] lists
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive:
>> http://www.mail-archive.com/catalyst [at] lists/
>> Dev site: http://dev.catalyst.perl.org/
>
>
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


lin.support at gmail

Jul 29, 2012, 9:12 AM

Post #7 of 7 (704 views)
Permalink
Re: Problem with Catalyst 5.8 and mod_perl 2 [In reply to]

Yes, I am using it in PHP

On Sun, Jul 29, 2012 at 9:04 PM, Hailin Hu <i [at] h2l> wrote:

> Are you sure GEOIP_COUNTRY_CODE does exist?
>
> On Mon, Jul 30, 2012 at 12:18 AM, linuxsupport <lin.support [at] gmail>
> wrote:
> > I tried PerlPassEnv GEOIP_COUNTRY_CODE
> > but still not getting it in %ENV
> >
> >
> > On Sun, Jul 29, 2012 at 8:39 PM, Hailin Hu <i [at] h2l> wrote:
> >>
> >> http://perl.apache.org/docs/2.0/user/config/config.html#C_modperl_
> >> modperl doesn't set %ENV like CGI be default. you can use PerlPassEnv.
> >>
> >> On Sun, Jul 29, 2012 at 11:48 PM, linuxsupport <lin.support [at] gmail>
> >> wrote:
> >> > Yes
> >> >
> >> > PassEnv GEOIP_COUNTRY_CODE
> >> >
> >> > I dumped the %ENV, and got following
> >> >
> >> > [debug] $VAR1 = 'PATH';
> >> >
> >> > $VAR2 = '/sbin:/usr/sbin:/bin:/usr/bin';
> >> >
> >> > $VAR3 = 'MOD_PERL_API_VERSION';
> >> >
> >> > $VAR4 = 2;
> >> >
> >> > $VAR5 = 'MOD_PERL';
> >> >
> >> > $VAR6 = 'mod_perl/2.0.4';
> >> >
> >> >
> >> > On Sun, Jul 29, 2012 at 7:57 PM, Peter Flanigan <pjf [at] roxsoft>
> >> > wrote:
> >> >>
> >> >> On 29/07/12 15:10, linuxsupport wrote:
> >> >> > I have setup mod_geoip in Apache which creates environment variable
> >> >> > GEOIP_COUNTRY_CODE
> >> >> > I am not able to get this variable in catalyst controller, I have
> >> >> > tried
> >> >> > getting it form %ENV.
> >> >>
> >> >> Have you specified Passenv?
> >> >>
> >> >> http://httpd.apache.org/docs/current/mod/mod_env.htm
> >> >>
> >> >> --
> >> >>
> >> >> Regards
> >> >>
> >> >> _______________________________________________
> >> >> List: Catalyst [at] lists
> >> >> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> >> >> Searchable archive:
> >> >> http://www.mail-archive.com/catalyst [at] lists/
> >> >> Dev site: http://dev.catalyst.perl.org/
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > List: Catalyst [at] lists
> >> > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> >> > Searchable archive:
> >> > http://www.mail-archive.com/catalyst [at] lists/
> >> > Dev site: http://dev.catalyst.perl.org/
> >> >
> >>
> >> _______________________________________________
> >> List: Catalyst [at] lists
> >> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> >> Searchable archive:
> >> http://www.mail-archive.com/catalyst [at] lists/
> >> Dev site: http://dev.catalyst.perl.org/
> >
> >
> >
> > _______________________________________________
> > List: Catalyst [at] lists
> > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> > Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> > Dev site: http://dev.catalyst.perl.org/
> >
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.