On Tuesday 04 April 2006 01:37, John Russell wrote:
> sub authenticate {
>
> my $r = shift;
>
> my $dbh;
>
> $dbh = DBI->connect("dbi:Oracle:XE", "WEB_LOGIN", "",
> {RaiseError => 0, AutoCommit => 1, PrintError => 0})
> || return "Error connecting.\n$DBI::e
Original Message
From: John Russell <[EMAIL PROTECTED]>
Cc: modperl@perl.apache.org
Subject: Re:pnotes MP1->MP2
Date: Mon Apr 03 2006 20:08:13
Here's the whole entry in the apache error_log
[Mon Apr 03 05:00:35 2006] [error] access to
/home/httpd/htdocs/com.onlywebdata.mc3/
Thank you for your help, a workaround has been found.
The cause of failure seems to be using pnotes in a subroutine
called by the handler.
It is easy enough to work around the problem by avoiding the subroutine.
Forgive me if I've wasted the list's time with poor coding but perhaps
it is a bug. H
It should work fine. I wrote the same thing today (albeit without
method calls)...
# Trans handler
sub lookup_handler {
my $r=shift;
my $dbh=GTS::Util::connectdb(); # essentially a wrapper for DBI->connect
...
$r->pnotes(dbh=>$dbh);
return Apache2::Const::DECLINED;
}
# Response handler
Geoff,
Sorry I'm not familiar with Apache2::TestModperl
search.cpan.org gives no hits for Apache2 TestModperl
How do I use this test to identify the problem with
MP2 pnotes?
I'm using
httpd-2.0.55
mod_perl-2.0.2
but can work with any trusted version.
If I comment out the line
# my $dbh = $r-
Thank you. Tried it, unfortunately no difference.
I'll try Geoffrey Young's test.
On Apr 3, 2006, at 12:08 PM, Torsten Foertsch wrote:
On Monday 03 April 2006 20:20, John Russell wrote:
sub handler($$) {
http://perl.apache.org/docs/2.0/user/porting/
porting.html#Method_Handlers
maybe that
John Russell wrote:
> In MP1 it was possible to do..
>
> Authorization Phase
>
> sub handler {
>
> my $dbh;
>
> $dbh = DBI->connect(..)
> || return "Error connecting.\n $DBI::errstr\n";
>
> $r->pnotes(DBH => $dbh);
>
>
> Response Phase
>
> sub handler($$) {
>
> my $dbh = $r
On Monday 03 April 2006 20:20, John Russell wrote:
> sub handler($$) {
http://perl.apache.org/docs/2.0/user/porting/porting.html#Method_Handlers
maybe that is your problem.
Torsten
pgpLWFPZiFN26.pgp
Description: PGP signature
Tom,
Thanks for your help.
I've only ever used pnotes to pass this DBI object so I've not had
experience
with other items. It worked fine in MP1.
I tried adding
use Apache2:RequestUtil();
to the existing entry in startup.pl
use Apache2::RequestRec ();
but it did not make any difference.
He
Is this only the case for DBI-Instances? I've been passing objects using
pnotes for quite a while in my apps and never had any problems.
What your the ... in your error message? Could you shown me the whole
code you are using maybe you forgot to load
Apache2::RequestUtil?
http://perl.apache.org/d
Tom,
under MP2
$r->pnotes(DBH => $dbh);
gives
failed for ..., reason: DBI::db=HASH(0x97c720c)
and also the same error with Apache2::SafePnotes.
Hence the reason to try de-referencing the hash.
Thank you, John.
On Apr 3, 2006, at 11:32 AM, Tom Schindl wrote:
John Russell wrote:
In MP1 it w
John Russell wrote:
> In MP1 it was possible to do..
>
> Authorization Phase
>
> sub handler {
>
> my $dbh;
>
> $dbh = DBI->connect(..)
> || return "Error connecting.\n $DBI::errstr\n";
>
> $r->pnotes(DBH => $dbh);
>
>
> Response Phase
>
> sub handler($$) {
>
> my $dbh = $r->
In MP1 it was possible to do..
Authorization Phase
sub handler {
my $dbh;
$dbh = DBI->connect(..)
|| return "Error connecting.\n $DBI::errstr\n";
$r->pnotes(DBH => $dbh);
Response Phase
sub handler($$) {
my $dbh = $r->pnotes('DBH');
However this doesn't work in MP2 because
13 matches
Mail list logo