Re: pnotes MP1->MP2

2006-04-03 Thread Torsten Foertsch
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

Re: pnotes MP1->MP2

2006-04-03 Thread Jeff Armstrong
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/

Re: Problems With mod_perl on Apache 2.0

2006-04-03 Thread Hal Vaughan
Tom Williams wrote: > Hal Vaughan wrote: >> I'm using Apache 2.0 on Debian Linux. I've installed mod_perl and I can >> see >> the links for perl.load and perl.conf in /etc/apache2/mods_enabled. My >> perl.load is like this: >> >> LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so >> >>

Re: Problems With mod_perl on Apache 2.0

2006-04-03 Thread Tom Williams
Hal Vaughan wrote: > I'm using Apache 2.0 on Debian Linux. I've installed mod_perl and I can see > the links for perl.load and perl.conf in /etc/apache2/mods_enabled. My > perl.load is like this: > > LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so > > >SetHandler perl-script >

Problems With mod_perl on Apache 2.0

2006-04-03 Thread Hal Vaughan
I'm using Apache 2.0 on Debian Linux.  I've installed mod_perl and I can see the links for perl.load and perl.conf in /etc/apache2/mods_enabled.  My perl.load is like this: LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so    SetHandler  perl-script    PerlResponseHandler ModPerl::Regi

Re: [RFC PATCH BUG DBI] Apache::AuthDBI broken

2006-04-03 Thread Jonathan Vanasco
On Apr 3, 2006, at 8:19 PM, [EMAIL PROTECTED] wrote: I don't think there's any down-side to adding DISTINCT. (Is it standard sql? I think it probably is, but I don't have a reference.) If there is, it would be worth adding another yes/no knob to the config. SELECT DISTINCT behaves radica

Re: [RFC PATCH BUG DBI] Apache::AuthDBI broken

2006-04-03 Thread Philip M. Gollucci
[EMAIL PROTECTED] wrote: I just noticed one additional tweak that would be worth adding to your list: It would be good to add "DISTINCT" to the group select statement... That is, change (after my patch): my $select= "SELECT $Attr->{grp_field}, $Attr->{uid_field}"; to: my $select= "S

Re: [RFC PATCH BUG DBI] Apache::AuthDBI broken

2006-04-03 Thread pedersen
I just noticed one additional tweak that would be worth adding to your list: It would be good to add "DISTINCT" to the group select statement... That is, change (after my patch): my $select= "SELECT $Attr->{grp_field}, $Attr->{uid_field}"; to: my $select= "SELECT DISTINCT $Attr->{grp_

re: pnotes MP1->MP2

2006-04-03 Thread John Russell
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

Re: pnotes MP1->MP2

2006-04-03 Thread Issac Goldstand
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

[mp2] $req->main->is_initial_req == 0 ???

2006-04-03 Thread Michael McLagan
-8<-- Start Bug Report 8<-- 1. Problem Description: I'm not sure if this is my interpretation of the documentation or a real problem with the code. The documentation says: > If the current request is a sub-request, this method returns a >

Re: Apache error logging under mod_perl

2006-04-03 Thread Jonathan Field
Thanks Tom, good info I had not come across before! The page refers to Apache 2, but they must have backported this to Apache 1.3 at some point as well. On Mon, 3 Apr 2006, Tom Schindl wrote: Jonathan Field wrote: Hi all, I've noticed that under mod_perl any die() (or croak()) calls get re

Re: pnotes MP1->MP2

2006-04-03 Thread John Russell
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-

Re: pnotes MP1->MP2

2006-04-03 Thread John Russell
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

Re: pnotes MP1->MP2

2006-04-03 Thread Geoffrey Young
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

Re: pnotes MP1->MP2

2006-04-03 Thread Torsten Foertsch
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

Re: pnotes MP1->MP2

2006-04-03 Thread John Russell
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

Re: pnotes MP1->MP2

2006-04-03 Thread Tom Schindl
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

Re: pnotes MP1->MP2

2006-04-03 Thread John Russell
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

Re: pnotes MP1->MP2

2006-04-03 Thread Tom Schindl
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->

pnotes MP1->MP2

2006-04-03 Thread John Russell
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

Re: [OT] Re: Database transaction across multiple web requests

2006-04-03 Thread Issac Goldstand
Right - that was the line I was trying to find earlier. So much for my theory about ignoring the LIMITs :-( All I can think of to explain the speedup that people (including myself) tend to see anyway is the indexes being cached in the key_buffer the second+ times around. Issac Jeff wrote: > -

Re: Database transaction across multiple web requests

2006-04-03 Thread Issac Goldstand
If anything, it really doesn't make sense to cache something in the query cache with limits intact; LIMIT is just a modifier which trims the result set on the server side. Since LIMIT doesn't actually affect the result set, per se, it doesn't make sense for the query cache to pay attention to it a