RE: FW: Apache::DBI Failed due to +GlobalRequest
am 12.09.2009 17:27:39 von Raja.Kulasekaran
This is a multi-part message in MIME format.
------_=_NextPart_001_01CA33BD.9111FD4B
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
=20
Great. I guess this might solve the problem.=20
=20
I had found in one of the forum stating that we can write a handler =
which generates the "$r" global object before initiate the Apache::DBI =
connection . Is that possible ? .
=20
Otherwise, Shall I install Apache::DBI 1.06 instead of Apache::DBI 1.07 =
?=20
=20
Thanks,
Raja=20
=20
From: Brad Van Sickle [mailto:bvs7085@gmail.com]=20
Sent: Saturday, September 12, 2009 7:54 PM
To: mod_perl list
Cc: Kulasekaran, Raja
Subject: Re: FW: Apache::DBI Failed due to +GlobalRequest
=20
I've run into this before. It's a bug in v1.07 of Apache::DBI
Open up the Apache/DBI.pm source file (on one of my test systems it's =
installed in /usr/lib/perl5/site_perl/5.8.8/Apache/DBI.pm) aind the =
following block of code:=20
if (!$Rollback{$Idx}) {
my $r;
if (MP2) {
$r =3D Apache2::RequestUtil->request;
}
elsif (Apache->can('push_handlers')) {
$r =3D 'Apache';
}
The problem with this is that if you're calling this from startup.pl =
you're not actually in a request at that point (as someone already =
mentioned) so without the eval there the script dies.=20
Fix it by wrapping the "$r =3D Apache2::RequestUtil->request;" part in =
an eval so it looks like this: eval { $r =3D =
Apache2::RequestUtil->request;}
Andr=E9 Warnier wrote:=20
Kulasekaran, Raja wrote:=20
Hi,=20
Thanks for your mail. I did tried. It's not working .=20
Yes, I am sorry. I did not look close enough at the following error :=20
[Thu Sep 10 14:39:30 2009] [error] Global $r object is not available.=20
Set:\n\tPerlOptions +GlobalRequest\nin httpd.conf at=20
/var/www/audashboard/exec/startup.pl line 24.\nCompilation failed in=20
require at (eval 5) line 1.\n=20
In a mod_perl *request* handler, the first argument=20
(my $r =3D shift;)=20
is usually a pointer to the current Request object.=20
But in your startup script (startup.pl), that is not the case, because =
when that script is run, there is no request yet.=20
I don't know what you are trying to do with $r in that startup script, =
but something is wrong and maybe the error message above is misleading.=20
(I mean that it may have nothing to do with GlobalRequest at that =
stage.)=20
------_=_NextPart_001_01CA33BD.9111FD4B
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" =
xmlns:p=3D"urn:schemas-microsoft-com:office:powerpoint" =
xmlns:a=3D"urn:schemas-microsoft-com:office:access" =
xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" =
xmlns:s=3D"uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" =
xmlns:rs=3D"urn:schemas-microsoft-com:rowset" xmlns:z=3D"#RowsetSchema" =
xmlns:b=3D"urn:schemas-microsoft-com:office:publisher" =
xmlns:ss=3D"urn:schemas-microsoft-com:office:spreadsheet" =
xmlns:c=3D"urn:schemas-microsoft-com:office:component:spread sheet" =
xmlns:odc=3D"urn:schemas-microsoft-com:office:odc" =
xmlns:oa=3D"urn:schemas-microsoft-com:office:activation" =
xmlns:html=3D"http://www.w3.org/TR/REC-html40" =
xmlns:q=3D"http://schemas.xmlsoap.org/soap/envelope/" =
xmlns:rtc=3D"http://microsoft.com/officenet/conferencing" =
xmlns:D=3D"DAV:" xmlns:Repl=3D"http://schemas.microsoft.com/repl/" =
xmlns:mt=3D"http://schemas.microsoft.com/sharepoint/soap/mee tings/" =
xmlns:x2=3D"http://schemas.microsoft.com/office/excel/2003/x ml" =
xmlns:ppda=3D"http://www.passport.com/NameSpace.xsd" =
xmlns:ois=3D"http://schemas.microsoft.com/sharepoint/soap/oi s/" =
xmlns:dir=3D"http://schemas.microsoft.com/sharepoint/soap/di rectory/" =
xmlns:ds=3D"http://www.w3.org/2000/09/xmldsig#" =
xmlns:dsp=3D"http://schemas.microsoft.com/sharepoint/dsp" =
xmlns:udc=3D"http://schemas.microsoft.com/data/udc" =
xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" =
xmlns:sub=3D"http://schemas.microsoft.com/sharepoint/soap/20 02/1/alerts/"=
xmlns:ec=3D"http://www.w3.org/2001/04/xmlenc#" =
xmlns:sp=3D"http://schemas.microsoft.com/sharepoint/" =
xmlns:sps=3D"http://schemas.microsoft.com/sharepoint/soap/" =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" =
xmlns:udcs=3D"http://schemas.microsoft.com/data/udc/soap" =
xmlns:udcxf=3D"http://schemas.microsoft.com/data/udc/xmlfile " =
xmlns:udcp2p=3D"http://schemas.microsoft.com/data/udc/partto part" =
xmlns:wf=3D"http://schemas.microsoft.com/sharepoint/soap/wor kflow/" =
xmlns:dsss=3D"http://schemas.microsoft.com/office/2006/digsi g-setup" =
xmlns:dssi=3D"http://schemas.microsoft.com/office/2006/digsi g" =
xmlns:mdssi=3D"http://schemas.openxmlformats.org/package/200 6/digital-sig=
nature" =
xmlns:mver=3D"http://schemas.openxmlformats.org/markup-compa tibility/2006=
" xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns:mrels=3D"http://schemas.openxmlformats.org/package/200 6/relationshi=
ps" xmlns:spwp=3D"http://microsoft.com/sharepoint/webpartpages" =
xmlns:ex12t=3D"http://schemas.microsoft.com/exchange/service s/2006/types"=
=
xmlns:ex12m=3D"http://schemas.microsoft.com/exchange/service s/2006/messag=
es" =
xmlns:pptsl=3D"http://schemas.microsoft.com/sharepoint/soap/ SlideLibrary/=
" =
xmlns:spsl=3D"http://microsoft.com/webservices/SharePointPor talServer/Pub=
lishedLinksService" xmlns:Z=3D"urn:schemas-microsoft-com:" =
xmlns:st=3D"" xmlns=3D"http://www.w3.org/TR/REC-html40">
charset=3Diso-8859-1">
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Hi,
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Great. I guess this might solve the problem. =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>I had found in one of the forum stating that=A0 we can =
write a
handler which generates the “$r” global object =A0before =
initiate the
Apache::DBI =A0connection . =A0Is that possible ? =
..
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Otherwise, Shall I=A0 install Apache::DBI 1.06 instead of
Apache::DBI 1.07 ?
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Thanks,
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Raja
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
0in 0in 0in'>
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:windowtext'>From:
style=3D'font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'> Brad Van Sickle
[mailto:bvs7085@gmail.com]
Sent: Saturday, September 12, 2009 7:54 PM
To: mod_perl list
Cc: Kulasekaran, Raja
Subject: Re: FW: Apache::DBI Failed due to =
+GlobalRequest
I've run into this before. It's a bug in =
v1.07 of
Apache::DBI
Open up the Apache/DBI.pm source file (on one of my test systems it's =
installed
in /usr/lib/perl5/site_perl/5.8.8/Apache/DBI.pm) aind the following =
block of
code:
if (!$Rollback{$Idx}) {
my $r;
if (MP2) {
&=
nbsp;
$r =3D Apache2::RequestUtil->request;
&=
nbsp;
}
elsif
(Apache->can('push_handlers')) {
$r =
=3D
'Apache';
}
The problem with this is that if you're calling this from startup.pl =
you're not
actually in a request at that point (as someone already mentioned) =
so
without the eval there the script dies.
Fix it by wrapping the "$r =3D =
Apache2::RequestUtil->request;"
part in an eval so it looks like this: eval { $r =3D
Apache2::RequestUtil->request;}
Andr=E9 Warnier wrote:
Kulasekaran, Raja wrote:
Hi,
Thanks for your mail. I did tried. It's not working .
Yes, I am sorry. I did not look close enough =
at the
following error :
[Thu Sep 10 14:39:30 2009] [error] Global $r object is not available. =
Set:\n\tPerlOptions +GlobalRequest\nin httpd.conf at
/var/www/audashboard/exec/startup.pl line 24.\nCompilation failed in =
require at (eval 5) line 1.\n
In a mod_perl *request* handler, the first argument
(my $r =3D shift;)
is usually a pointer to the current Request object.
But in your startup script (startup.pl), that is not the case, because =
when
that script is run, there is no request yet.
I don't know what you are trying to do with $r in that startup script, =
but
something is wrong and maybe the error message above is misleading.
(I mean that it may have nothing to do with GlobalRequest at that =
stage.)
------_=_NextPart_001_01CA33BD.9111FD4B--
RE: FW: Apache::DBI Failed due to +GlobalRequest
am 13.09.2009 16:09:37 von Raja.Kulasekaran
This is a multi-part message in MIME format.
------_=_NextPart_001_01CA347B.D5215838
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
=20
Persistent DB connection working fine with Apache::DBI .=20
=20
But When I try to benchmark the performance with apache "ab" command =
( ab -n 100 -c 3 hostname ) , It failed with Segmentation fault (11) =
..=20
=20
I have enabled the DBI trace and it shows like=20
=20
" DBD::Oracle::st execute failed: ORA-01002: fetch out of sequence (DBD =
ERROR: OCIStmtExecute) [for Statement "
=20
Any suggestion on this ?=20
=20
Thanks,
Raja=20
=20
From: Brad Van Sickle [mailto:bvs7085@gmail.com]=20
Sent: Saturday, September 12, 2009 9:29 PM
To: Kulasekaran, Raja
Cc: mod_perl list
Subject: Re: FW: Apache::DBI Failed due to +GlobalRequest
=20
That simple modification of the code I gave you should solve your =
problem in 2 minutes. No need to downgrade.=20
Kulasekaran, Raja wrote:=20
Hi,
=20
Great. I guess this might solve the problem.=20
=20
I had found in one of the forum stating that we can write a handler =
which generates the "$r" global object before initiate the Apache::DBI =
connection . Is that possible ? .
=20
Otherwise, Shall I install Apache::DBI 1.06 instead of Apache::DBI 1.07 =
?=20
=20
Thanks,
Raja=20
=20
From: Brad Van Sickle [mailto:bvs7085@gmail.com]=20
Sent: Saturday, September 12, 2009 7:54 PM
To: mod_perl list
Cc: Kulasekaran, Raja
Subject: Re: FW: Apache::DBI Failed due to +GlobalRequest
=20
I've run into this before. It's a bug in v1.07 of Apache::DBI
Open up the Apache/DBI.pm source file (on one of my test systems it's =
installed in /usr/lib/perl5/site_perl/5.8.8/Apache/DBI.pm) aind the =
following block of code:=20
if (!$Rollback{$Idx}) {
my $r;
if (MP2) {
$r =3D Apache2::RequestUtil->request;
}
elsif (Apache->can('push_handlers')) {
$r =3D 'Apache';
}
The problem with this is that if you're calling this from startup.pl =
you're not actually in a request at that point (as someone already =
mentioned) so without the eval there the script dies.=20
Fix it by wrapping the "$r =3D Apache2::RequestUtil->request;" part in =
an eval so it looks like this: eval { $r =3D =
Apache2::RequestUtil->request;}
Andr=E9 Warnier wrote:=20
Kulasekaran, Raja wrote:=20
Hi,=20
Thanks for your mail. I did tried. It's not working .=20
Yes, I am sorry. I did not look close enough at the following error :=20
[Thu Sep 10 14:39:30 2009] [error] Global $r object is not available.=20
Set:\n\tPerlOptions +GlobalRequest\nin httpd.conf at=20
/var/www/audashboard/exec/startup.pl line 24.\nCompilation failed in=20
require at (eval 5) line 1.\n=20
In a mod_perl *request* handler, the first argument=20
(my $r =3D shift;)=20
is usually a pointer to the current Request object.=20
But in your startup script (startup.pl), that is not the case, because =
when that script is run, there is no request yet.=20
I don't know what you are trying to do with $r in that startup script, =
but something is wrong and maybe the error message above is misleading.=20
(I mean that it may have nothing to do with GlobalRequest at that =
stage.)=20
------_=_NextPart_001_01CA347B.D5215838
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
charset=3Diso-8859-1">
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Hi,
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Persistent DB =A0connection working fine with Apache::DBI =
..
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>But When I try to benchmark the performance with=A0 =
apache=A0 “ab”
command =A0( ab -n 100 -c 3=A0 hostname ) ,=A0 It failed with =
=A0Segmentation fault
(11) .
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>I have enabled the DBI trace and it shows like =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>“ DBD::Oracle::st execute failed: ORA-01002: fetch =
out of
sequence (DBD ERROR: OCIStmtExecute) [for Statement =
“
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Any suggestion on this ?
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Thanks,
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Raja
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
0in 0in 0in'>
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:windowtext'>From:
style=3D'font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'> Brad Van Sickle
[mailto:bvs7085@gmail.com]
Sent: Saturday, September 12, 2009 9:29 PM
To: Kulasekaran, Raja
Cc: mod_perl list
Subject: Re: FW: Apache::DBI Failed due to =
+GlobalRequest
That simple modification of the code I gave you =
should solve
your problem in 2 minutes. No need to downgrade.
Kulasekaran, Raja wrote:
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Hi,
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Great. I guess this might solve the problem. =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>I had found in one of the forum stating that we can =
write
a handler which generates the “$r” global object =
before
initiate the Apache::DBI connection . Is that possible ? =
..
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Otherwise, Shall I install Apache::DBI 1.06 instead =
of
Apache::DBI 1.07 ?
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Thanks,
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Raja
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>
1.0pt;padding:3.0pt 0in 0in 0in;
border-color:-moz-use-text-color -moz-use-text-color'>
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:windowtext'>From:
style=3D'font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'> Brad Van Sickle [
href=3D"mailto:bvs7085@gmail.com">mailto:bvs7085@gmail.com]
Sent: Saturday, September 12, 2009 7:54 PM
To: mod_perl list
Cc: Kulasekaran, Raja
Subject: Re: FW: Apache::DBI Failed due to =
+GlobalRequest
I've run into this before. It's a bug in =
v1.07 of
Apache::DBI
Open up the Apache/DBI.pm source file (on one of my test systems it's =
installed
in /usr/lib/perl5/site_perl/5.8.8/Apache/DBI.pm) aind the following =
block of
code:
if (!$Rollback{$Idx}) {
my $r;
if (MP2) {
&=
nbsp;
$r =3D Apache2::RequestUtil->request;
&=
nbsp;
}
elsif
(Apache->can('push_handlers')) {
$r =
=3D
'Apache';
}
The problem with this is that if you're calling this from startup.pl =
you're not
actually in a request at that point (as someone already mentioned) =
so
without the eval there the script dies.
Fix it by wrapping the "$r =3D =
Apache2::RequestUtil->request;"
part in an eval so it looks like this: eval { $r =3D
Apache2::RequestUtil->request;}
Andr=E9 Warnier wrote:
Kulasekaran, Raja wrote:
Hi,
Thanks for your mail. I did tried. It's not working .
Yes, I am sorry. I did not look close enough =
at the
following error :
[Thu Sep 10 14:39:30 2009] [error] Global $r object is not available. =
Set:\n\tPerlOptions +GlobalRequest\nin httpd.conf at
/var/www/audashboard/exec/startup.pl line 24.\nCompilation failed in =
require at (eval 5) line 1.\n
In a mod_perl *request* handler, the first argument
(my $r =3D shift;)
is usually a pointer to the current Request object.
But in your startup script (startup.pl), that is not the case, because =
when
that script is run, there is no request yet.
I don't know what you are trying to do with $r in that startup script, =
but
something is wrong and maybe the error message above is misleading.
(I mean that it may have nothing to do with GlobalRequest at that =
stage.)
------_=_NextPart_001_01CA347B.D5215838--