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

Mailing List Archive: ModPerl: ModPerl

No $r = no mod_perl?

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


tosh at 1200group

Jul 10, 2011, 3:08 AM

Post #1 of 5 (396 views)
Permalink
No $r = no mod_perl?

So I'm following your advice and going the easy route of apt-get everything.

My original server had this config:
Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server

And two years later we're at:
Apache/2.2.14 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.1 Server

Is that really the state of two years of progress in apt-get packages,
or did I choose the wrong repository?

And so after copying over configs and startups I'm getting this error:

Can't call method "auth_name" on an undefined value at
/usr/local/share/perl/5.10.1/Apache2/AuthCookieDBI.pm line 284.

Which is: my $auth_name = $r->auth_name;

So the fact that $r is undefined tells me that whatever is running is
NOT running under mod_perl, is this a valid assessment?

Because right now I will have to get into a fight with my sys-admin who
will say it's not working because I didn't configure something
correctly, but my position is if he apt-gets everything and then copies
over the config/startup from the old (working) install then everything
*should* work so he's probably left out something.

Do you see now why I would prefer to work with a PaaS instead of admins,
I don't want to have to deal with this, I just want to write apps.

Thanks!

Tosh

--
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/


adam.prime at utoronto

Jul 10, 2011, 8:50 AM

Post #2 of 5 (382 views)
Permalink
Re: No $r = no mod_perl? [In reply to]

On 7/10/2011 6:08 AM, Tosh Cooey wrote:
> So I'm following your advice and going the easy route of apt-get
> everything.
>
> My original server had this config:
> Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server
>
> And two years later we're at:
> Apache/2.2.14 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.1 Server
>
> Is that really the state of two years of progress in apt-get packages,
> or did I choose the wrong repository?
>
> And so after copying over configs and startups I'm getting this error:
>
> Can't call method "auth_name" on an undefined value at
> /usr/local/share/perl/5.10.1/Apache2/AuthCookieDBI.pm line 284.
>
> Which is: my $auth_name = $r->auth_name;
>
> So the fact that $r is undefined tells me that whatever is running is
> NOT running under mod_perl, is this a valid assessment?
>
> Because right now I will have to get into a fight with my sys-admin who
> will say it's not working because I didn't configure something
> correctly, but my position is if he apt-gets everything and then copies
> over the config/startup from the old (working) install then everything
> *should* work so he's probably left out something.

This does sounds like something in the config didn't get copied over. I
believe your stuff runs as registry/perlrun scripts, so that would be
the configuration that's missing.

Adam


hs at activeframe

Jul 10, 2011, 10:09 AM

Post #3 of 5 (381 views)
Permalink
Re: No $r = no mod_perl? [In reply to]

Maybe you are using the wrong sethandler value for your application, check

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

If you are using a global $r variable you should specify

SetHandler perl-script

and not

SetHandler modperl

Using the latter you get the $r variable as an argument to your handler-sub.

Hendrik

Am So, 10.07.2011, 12:08 schrieb Tosh Cooey:
> So I'm following your advice and going the easy route of apt-get
> everything.
>
> My original server had this config:
> Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server
>
> And two years later we're at:
> Apache/2.2.14 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.1 Server
>
> Is that really the state of two years of progress in apt-get packages,
> or did I choose the wrong repository?
>
> And so after copying over configs and startups I'm getting this error:
>
> Can't call method "auth_name" on an undefined value at
> /usr/local/share/perl/5.10.1/Apache2/AuthCookieDBI.pm line 284.
>
> Which is: my $auth_name = $r->auth_name;
>
> So the fact that $r is undefined tells me that whatever is running is
> NOT running under mod_perl, is this a valid assessment?
>
> Because right now I will have to get into a fight with my sys-admin who
> will say it's not working because I didn't configure something
> correctly, but my position is if he apt-gets everything and then copies
> over the config/startup from the old (working) install then everything
> *should* work so he's probably left out something.
>
> Do you see now why I would prefer to work with a PaaS instead of admins,
> I don't want to have to deal with this, I just want to write apps.
>
> Thanks!
>
> Tosh
>
> --
> McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/
>


menzer at apple

Jul 10, 2011, 10:29 AM

Post #4 of 5 (379 views)
Permalink
Re: No $r = no mod_perl? [In reply to]

Do you have a configuration similar to this in httpd.conf:



<Directory /www/domain.com/authcookiedbi>
AuthType Apache2::AuthCookieDBI
AuthName WhatEver
PerlAuthenHandler Apache2::AuthCookieDBI->authenticate
PerlAuthzHandler Apache2::AuthCookieDBI->authorize
require valid-user
# or you can require users:
require user jacob
# You can optionally require groups.
require group system
</Directory>



On Jul 10, 2011, at 8:50 AM, Adam Prime <adam.prime [at] utoronto> wrote:

> On 7/10/2011 6:08 AM, Tosh Cooey wrote:
>> So I'm following your advice and going the easy route of apt-get
>> everything.
>>
>> My original server had this config:
>> Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server
>>
>> And two years later we're at:
>> Apache/2.2.14 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.1 Server
>>
>> Is that really the state of two years of progress in apt-get packages,
>> or did I choose the wrong repository?
>>
>> And so after copying over configs and startups I'm getting this error:
>>
>> Can't call method "auth_name" on an undefined value at
>> /usr/local/share/perl/5.10.1/Apache2/AuthCookieDBI.pm line 284.
>>
>> Which is: my $auth_name = $r->auth_name;
>>
>> So the fact that $r is undefined tells me that whatever is running is
>> NOT running under mod_perl, is this a valid assessment?
>>
>> Because right now I will have to get into a fight with my sys-admin who
>> will say it's not working because I didn't configure something
>> correctly, but my position is if he apt-gets everything and then copies
>> over the config/startup from the old (working) install then everything
>> *should* work so he's probably left out something.
>
> This does sounds like something in the config didn't get copied over. I believe your stuff runs as registry/perlrun scripts, so that would be the configuration that's missing.
>
> Adam
>
>


tosh at 1200group

Jul 10, 2011, 12:30 PM

Post #5 of 5 (378 views)
Permalink
Re: No $r = no mod_perl? [In reply to]

Sorry, false alarm... I had subclassed Apache2::AuthCookieDBI 2.12 and
had to do things like this:

*Apache2::AuthCookieDBI::_dbi_connect = sub {

since Apache2::AuthCookieDBI wasn't very subclassable, and with the
upgrade to a very nice Apache2::AuthCookieDBI 2.14 my whatever I did up
there broke things.

I guess I owe my admin a beer.

Tosh


On 7/10/11 7:09 PM, Hendrik Schumacher wrote:
> Maybe you are using the wrong sethandler value for your application, check
>
> http://perl.apache.org/docs/2.0/user/config/config.html#C_GlobalRequest_
>
> If you are using a global $r variable you should specify
>
> SetHandler perl-script
>
> and not
>
> SetHandler modperl
>
> Using the latter you get the $r variable as an argument to your handler-sub.
>
> Hendrik
>
> Am So, 10.07.2011, 12:08 schrieb Tosh Cooey:
>> So I'm following your advice and going the easy route of apt-get
>> everything.
>>
>> My original server had this config:
>> Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server
>>
>> And two years later we're at:
>> Apache/2.2.14 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.1 Server
>>
>> Is that really the state of two years of progress in apt-get packages,
>> or did I choose the wrong repository?
>>
>> And so after copying over configs and startups I'm getting this error:
>>
>> Can't call method "auth_name" on an undefined value at
>> /usr/local/share/perl/5.10.1/Apache2/AuthCookieDBI.pm line 284.
>>
>> Which is: my $auth_name = $r->auth_name;
>>
>> So the fact that $r is undefined tells me that whatever is running is
>> NOT running under mod_perl, is this a valid assessment?
>>
>> Because right now I will have to get into a fight with my sys-admin who
>> will say it's not working because I didn't configure something
>> correctly, but my position is if he apt-gets everything and then copies
>> over the config/startup from the old (working) install then everything
>> *should* work so he's probably left out something.
>>
>> Do you see now why I would prefer to work with a PaaS instead of admins,
>> I don't want to have to deal with this, I just want to write apps.
>>
>> Thanks!
>>
>> Tosh
>>
>> --
>> McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/
>>
>
>
>

--
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/

ModPerl modperl 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.