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

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

am 24.09.2008 18:39:05 von Fred Moyer

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_Gl obalRequest_

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

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

am 24.09.2008 19:08:46 von Bryan-Kirk Reinhardt

--Apple-Mail-2--844209561
Content-Type: text/plain;
charset=US-ASCII;
format=flowed;
delsp=yes
Content-Transfer-Encoding: 7bit

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@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_Gl obalRequest_
>
> 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


--Apple-Mail-2--844209561
Content-Type: text/html;
charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

-webkit-line-break: after-white-space; ">Thanks everyone for the quick =
response.


class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; ">
style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; "> style=3D"border-collapse: separate; border-spacing: 0px 0px; color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: =
normal; font-variant: normal; font-weight: normal; letter-spacing: =
normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "> class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "> class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; ">
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 +Glob=
alRequest -SetupEnv =
-ParseHeaders

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


also =
tried:


PerlOptions +G=
lobalRequest -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:

style=3D"font-weight: bold; ">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++
_______________________
bold; "> class=3D"Apple-style-span" size=3D"3"> style=3D"font-size: 13px;; color: rgb(0, 0, 255); font-weight: bold; =
"> font-size: 13px; font-weight: bold; "> style=3D"color: rgb(0, 0, 255); font-size: 13px; font-weight: bold; =
"> font-size: 13px; font-weight: bold; "> style=3D"color: rgb(0, 0, 255); font-size: 13px; font-weight: bold; =
">Bryan-Kirk =
Reinhardt
S=
r. Software Engineer
::::::::::=
::::::::::::::::::::::::::::::::::::::::::::
style=3D"font-weight: bold; "> style=3D"font-weight: bold; "> style=3D"font-weight: bold; "> style=3D"font-weight: bold; "> style=3D"font-weight: bold; ">Blingo, =
Inc.
1620 Montgomery Street =
#170
San Francisco CA 94111
United =
States
work style=3D"white-space:pre"> style=3D"white-space: pre; "> style=3D"white-space: pre; "> style=3D"white-space: pre; "> 415-277-7223 =
x304
mobile style=3D"white-space:pre"> style=3D"white-space: pre; "> style=3D"white-space: pre; "> style=3D"white-space: pre; "> =
415-816-0675
work fax class=3D"Apple-tab-span" style=3D"white-space:pre"> class=3D"Apple-style-span" style=3D"white-space: pre; "> class=3D"Apple-style-span" style=3D"white-space: pre; "> class=3D"Apple-style-span" style=3D"white-space: pre; "> =
415-381-3630
IM bkratblingo =
(AIM)
_______________________

class=3D"Apple-interchange-newline">
=

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

type=3D"cite">
Hi Brian,

Bryan-Kirk Reinhardt =
wrote:
Howdy:
type=3D"cite">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 ):
href=3D"http://www.gossamer-threads.com/lists/modperl/dev/97 744">http://ww=
w.gossamer-threads.com/lists/modperl/dev/97744

uote type=3D"cite">It wasn't clear how you all worked around this as the =
final details were left to expertise.
type=3D"cite">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.

href=3D"http://perl.apache.org/docs/2.0/user/config/config.h tml#C_GlobalRe=
quest_">http://perl.apache.org/docs/2.0/user/config/config.h tml#C_GlobalRe=
quest_


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

=

--Apple-Mail-2--844209561--