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

Mailing List Archive: ModPerl: ModPerl

Re: Apache::DBI 1.07 requires global $r - workaround?

 

 

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


fred at redhotpenguin

Sep 24, 2008, 9:39 AM

Post #1 of 5 (651 views)
Permalink
Re: Apache::DBI 1.07 requires global $r - workaround?

Hi Brian,

Bryan-Kirk Reinhardt wrote:
> Howdy:
>
> We're trying to get Apache::DBI 1.07 going, and we ran into this problem
> posted by Fred (which is re-published in various places as ):
>
> http://www.gossamer-threads.com/lists/modperl/dev/97744
>
> It wasn't clear how you all worked around this as the final details were
> left to expertise.
>
> Can someone please let me know how to work around this or edit in a fix?

Can you please cc the mod_perl list on all future correspondence? (I
have forwarded your email to the list)

I went ahead and use 1.06 in my production setup. If you want to use
1.07, you will need to include the GlobalRequest option in your config
setup.

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

I'm guessing that 1.08 will pop up in November sometime after ApacheCon,
quite a bit of hacking usually gets done there.

>
> Much thanks


perrin at elem

Sep 24, 2008, 9:42 AM

Post #2 of 5 (595 views)
Permalink
Re: Apache::DBI 1.07 requires global $r - workaround? [In reply to]

On Wed, Sep 24, 2008 at 12:39 PM, Fred Moyer <fred[at]redhotpenguin.com> wrote:
> I went ahead and use 1.06 in my production setup. If you want to use 1.07,
> you will need to include the GlobalRequest option in your config setup.

It should be fine to use GlobalRequest. The warnings against it are outdated.

- Perrin


bryan at blingo

Sep 24, 2008, 10:08 AM

Post #3 of 5 (571 views)
Permalink
Re: Apache::DBI 1.07 requires global $r - workaround? [In reply to]

Thanks everyone for the quick response.

Yes. We tried this fix before we had contacted you, and now I just
tried it again just to be sure I wasn't cross-eyed:

PerlOptions +GlobalRequest -SetupEnv -ParseHeaders

# Startup module sets @INC and does other initialization
PerlRequire .../foo/startup2.pl


also tried:


PerlOptions +GlobalRequest -SetupEnv -ParseHeaders
PerlModule Apache:DBI

# Startup module sets @INC and does other initialization
PerlRequire .../foo/startup2.pl


In startup2.pl, the

use Apache::DBI;

seems to trigger the failure...



Also, tried reversing the above line just to be hack sure:

PerlOptions -SetupEnv -ParseHeaders +GlobalRequest


but still get same error...

[Wed Sep 24 09:57:06 2008] [error] Global $r object is not available.
Set:\n\tPerlOptions +GlobalRequest\nin httpd.conf at /usr/lib/perl5/
site_perl/5.8.8/Apache/DBI.pm line 144.\nCompilation failed in require
at (eval 2) line 1.\n

Sounds to me like there is no other option but to rollback to a 1.06
release, unless you all think of something?

Thanks again.


(*void) bkr++
_______________________
Bryan-Kirk Reinhardt
Sr. Software Engineer
bryan[at]blingo.com
::::::::::::::::::::::::::::::::::::::::::::::::::::::
Blingo, Inc.
1620 Montgomery Street #170
San Francisco CA 94111
United States
work 415-277-7223 x304
mobile 415-816-0675
work fax 415-381-3630
IM bkratblingo (AIM)
_______________________


On Sep 24, 2008, at 9:39 AM, Fred Moyer wrote:

> Hi Brian,
>
> Bryan-Kirk Reinhardt wrote:
>> Howdy:
>> We're trying to get Apache::DBI 1.07 going, and we ran into this
>> problem posted by Fred (which is re-published in various places as ):
>> http://www.gossamer-threads.com/lists/modperl/dev/97744
>> It wasn't clear how you all worked around this as the final details
>> were left to expertise.
>> Can someone please let me know how to work around this or edit in a
>> fix?
>
> Can you please cc the mod_perl list on all future correspondence? (I
> have forwarded your email to the list)
>
> I went ahead and use 1.06 in my production setup. If you want to
> use 1.07, you will need to include the GlobalRequest option in your
> config setup.
>
> http://perl.apache.org/docs/2.0/user/config/config.html#C_GlobalRequest_
>
> I'm guessing that 1.08 will pop up in November sometime after
> ApacheCon, quite a bit of hacking usually gets done there.
>
>> Much thanks


adam.prime at utoronto

Sep 24, 2008, 12:24 PM

Post #4 of 5 (591 views)
Permalink
Re: Apache::DBI 1.07 requires global $r - workaround? [In reply to]

1.07 is broken. PGOLLUCCI said it was going to get reverted, but
apparently it hasn't happened.

see http://rt.cpan.org/Public/Bug/Display.html?id=36346

Adam

Quoting Perrin Harkins <perrin[at]elem.com>:

> On Wed, Sep 24, 2008 at 12:39 PM, Fred Moyer <fred[at]redhotpenguin.com> wrote:
>> I went ahead and use 1.06 in my production setup. If you want to use 1.07,
>> you will need to include the GlobalRequest option in your config setup.
>
> It should be fine to use GlobalRequest. The warnings against it are
> outdated.
>
> - Perrin
>


bryan at blingo

Sep 24, 2008, 12:39 PM

Post #5 of 5 (578 views)
Permalink
Re: Apache::DBI 1.07 requires global $r - workaround? [In reply to]

Thanks Adam!

UPDATE: Reverted back to 1.06 and Apache is loading now. whoohoo

To revert, remove the following 1.07 items from the system

/usr/lib/perl5/site_perl/5.8.8/Apache/AuthDBI.pm
/usr/lib/perl5/site_perl/5.8.8/Apache/DBI.pm
/usr/share/man/man3/Apache::AuthDBI.3pm
/usr/share/man/man3/Apache::DBI.3pm
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Apache/
DBI/.packlist

...edit the following file to remove the 1.06 entry

/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod

... then install 1.06 normally



(*void) bkr++
_______________________
Bryan-Kirk Reinhardt
Sr. Software Engineer
bryan[at]blingo.com
::::::::::::::::::::::::::::::::::::::::::::::::::::::
Blingo, Inc.
1620 Montgomery Street #170
San Francisco CA 94111
United States
work 415-277-7223 x304
mobile 415-816-0675
work fax 415-381-3630
IM bkratblingo (AIM)
_______________________


On Sep 24, 2008, at 12:24 PM, adam.prime[at]utoronto.ca wrote:

> 1.07 is broken. PGOLLUCCI said it was going to get reverted, but
> apparently it hasn't happened.
>
> see http://rt.cpan.org/Public/Bug/Display.html?id=36346
>
> Adam
>
> Quoting Perrin Harkins <perrin[at]elem.com>:
>
>> On Wed, Sep 24, 2008 at 12:39 PM, Fred Moyer
>> <fred[at]redhotpenguin.com> wrote:
>>> I went ahead and use 1.06 in my production setup. If you want to
>>> use 1.07,
>>> you will need to include the GlobalRequest option in your config
>>> setup.
>>
>> It should be fine to use GlobalRequest. The warnings against it
>> are outdated.
>>
>> - Perrin
>>
>
>
>

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


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.