Newbie question to mod_perl and Apache::DBI
Hi there, I am new to mod_perl and currently trying to make use of Apache::DBI. This is my enviroment: Suse Linux 6.3, Apache 1.3.12, mod_perl 1.24 and Oracle 8i. I am using HTML:Mason as well, as a templating system. Everything works. Apache::DBI is loaded via httpd.conf by Apache properly and I can make use of it in my scripts, when reading data. With my other script, updating data, I get the following error : Rebuild with -DPERL_STACKED_HANDLERS to $r-push_handlers at /usr/local/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 93. and the script does not get to connect the database and dies with a timeout. I think, I should add, that in both scripts, the one who is reading and the one who is updating, I open and close a $dbh (connect / disconnect). Anybody having an idea, what I am doing wrong ? Or where to find help ? Thanks for the help. Caro -- -- Caroline Kliegl Neustadt - Germany Sent through GMX FreeMail - http://www.gmx.net
Newbie question to mod_perl and Apache::DBI
Hi there, I am new to mod_perl and currently trying to make use of Apache::DBI. This is my enviroment: Suse Linux 6.3, Apache 1.3.12, mod_perl 1.24 and Oracle 8i. I am using HTML:Mason as well, as a templating system. Everything works. Apache::DBI is loaded via httpd.conf by Apache properly and I can make use of it in my scripts, when reading data. With my other script, updating data, I get the following error : Rebuild with -DPERL_STACKED_HANDLERS to $r-push_handlers at /usr/local/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 93. and the script does not get to connect the database and dies with a timeout. I think, I should add, that in both scripts, the one who is reading and the one who is updating, I open and close a $dbh (connect / disconnect). Anybody having an idea, what I am doing wrong ? Or where to find help ? Thanks for the help. Caro -- -- Caroline Kliegl Neustadt - Germany Sent through GMX FreeMail - http://www.gmx.net
Re: Newbie question to mod_perl and Apache::DBI
On Thu, Feb 08, 2001 at 11:57:50PM +0100, Caroline Kliegl wrote: [..] With my other script, updating data, I get the following error : Rebuild with -DPERL_STACKED_HANDLERS to $r-push_handlers at /usr/local/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 93. [..] You need to compile mod_perl with PERL_STACKED_HANDLERS = 1. See following for details: http://perl.apache.org/guide/databases.html#Apache_DBI_does_not_work Ajit
Re: Newbie question to mod_perl and Apache::DBI
Hi there, On Thu, 8 Feb 2001, Caroline Kliegl wrote: I am new to mod_perl and currently trying to make use of Apache::DBI. I get the following error : Rebuild with -DPERL_STACKED_HANDLERS to $r-push_handlers at /usr/local/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 93. I think it wants you to rebuild with -DPERL_STACKED_HANDLERS. http:perl.apache.org/guide - see the section on configuration. 73, Ged.
RE: Newbie question to mod_perl and Apache::DBI
Apache::DBI will call push_handlers on to issue a rollback if AutoCommit=0 in your connect string... but the problem may not be with you... looks like a bug (somewhere): if(!$Rollback{$Idx} and $needCleanup and Apache-can('push_handlers'){ ... } looks like calling Apache-can('push_handlers') is returning true even though you didn't activate PERL_STACKED_HANDLERS. I wonder if somehow can() isn't correctly capturing the build-time arguments (something to look into...) at any rate, the quickest way to fix this is to rebuild mod_perl with EVERYTHING=1 or PERL_STACKED_HANDLERS=1 (or don't set AutoCommit=0 in your connect string if you can't rebuild it now...) try these and see if they make a difference... HTH --Geoff -Original Message- From: Caroline Kliegl To: [EMAIL PROTECTED] Sent: 2/8/01 5:57 PM Subject: Newbie question to mod_perl and Apache::DBI Hi there, I am new to mod_perl and currently trying to make use of Apache::DBI. This is my enviroment: Suse Linux 6.3, Apache 1.3.12, mod_perl 1.24 and Oracle 8i. I am using HTML:Mason as well, as a templating system. Everything works. Apache::DBI is loaded via httpd.conf by Apache properly and I can make use of it in my scripts, when reading data. With my other script, updating data, I get the following error : Rebuild with -DPERL_STACKED_HANDLERS to $r-push_handlers at /usr/local/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 93. and the script does not get to connect the database and dies with a timeout. I think, I should add, that in both scripts, the one who is reading and the one who is updating, I open and close a $dbh (connect / disconnect). Anybody having an idea, what I am doing wrong ? Or where to find help ? Thanks for the help. Caro -- -- Caroline Kliegl Neustadt - Germany Sent through GMX FreeMail - http://www.gmx.net
RE: Newbie question to mod_perl and Apache::DBI
yup, it's a bug... #!/usr/bin/perl use Apache::MyConfig; my $r = shift; $r-send_http_header('text/plain'); print "can push_handlers\n" if Apache-can('push_handlers'); print "but PERL_STACKED_HANDLERS: ", $Apache::MyConfig::Setup{PERL_STACKED_HANDLERS}; basically Apache-can('push_handlers') returns true even if PERL_STACKED_HANDLERS=0 at build time... I guess that at some point this worked correctly, otherwise Edmund wouldn't have coded it that way? --Geoff -Original Message- From: Geoffrey Young To: 'Caroline Kliegl ' Cc: '[EMAIL PROTECTED]' Sent: 2/8/01 7:52 PM Subject: RE: Newbie question to mod_perl and Apache::DBI Apache::DBI will call push_handlers on to issue a rollback if AutoCommit=0 in your connect string... but the problem may not be with you... looks like a bug (somewhere): if(!$Rollback{$Idx} and $needCleanup and Apache-can('push_handlers'){ ... } looks like calling Apache-can('push_handlers') is returning true even though you didn't activate PERL_STACKED_HANDLERS. I wonder if somehow can() isn't correctly capturing the build-time arguments (something to look into...) at any rate, the quickest way to fix this is to rebuild mod_perl with EVERYTHING=1 or PERL_STACKED_HANDLERS=1 (or don't set AutoCommit=0 in your connect string if you can't rebuild it now...) try these and see if they make a difference... HTH --Geoff -Original Message- From: Caroline Kliegl To: [EMAIL PROTECTED] Sent: 2/8/01 5:57 PM Subject: Newbie question to mod_perl and Apache::DBI Hi there, I am new to mod_perl and currently trying to make use of Apache::DBI. This is my enviroment: Suse Linux 6.3, Apache 1.3.12, mod_perl 1.24 and Oracle 8i. I am using HTML:Mason as well, as a templating system. Everything works. Apache::DBI is loaded via httpd.conf by Apache properly and I can make use of it in my scripts, when reading data. With my other script, updating data, I get the following error : Rebuild with -DPERL_STACKED_HANDLERS to $r-push_handlers at /usr/local/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 93. and the script does not get to connect the database and dies with a timeout. I think, I should add, that in both scripts, the one who is reading and the one who is updating, I open and close a $dbh (connect / disconnect). Anybody having an idea, what I am doing wrong ? Or where to find help ? Thanks for the help. Caro -- -- Caroline Kliegl Neustadt - Germany Sent through GMX FreeMail - http://www.gmx.net
RE: Newbie question to mod_perl and Apache::DBI
Hi everybody, I have just removed RaiseError = 1, AutoCommit = 0 out of my DBI-connect. No more errors, ORA works! Next, I will recompile mod_perl with PERL_STACKED_HANDLERS = 1. Will come up with the result today. Thanks a lot, everybody! Caro -- -- Caroline Kliegl Neustadt - Germany Sent through GMX FreeMail - http://www.gmx.net