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: 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

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

Re: pnotes preserved accross calls?!

2005-12-19 Thread John ORourke
Quite right Tom... I think I found the problem anyway, it appears to work fine now - see below, I've collapsed a few function calls to make it clearer but you'll see what silliness was going on... I'm using method handlers and the object is preserved between requests, like so: package Data

Re: pnotes preserved accross calls?!

2005-12-19 Thread Tom Schindl
A little but more code would be help to see what you are really doing ;-) Tom John ORourke wrote: > Hi perlites, I'm getting my brain twisted here... > > [FYI: Apache 2.0.51, MP 2.0.1, Linux 2.6.5] > > still debugging but it *seems* like $r->pnotes is being preserved > between requests (I'm sto

Re: pnotes

2004-12-08 Thread Arshavir Grigorian
Perrin Harkins wrote: Arshavir Grigorian wrote: I have module called Application which handles all the requests to the site (except for images, etc) and then dispatches the request to a different module based on the $r->path_info(). Apache::Dispatch could do this for you if you like. You could

Re: pnotes

2004-12-01 Thread Perrin Harkins
Arshavir Grigorian wrote: I have module called Application which handles all the requests to the site (except for images, etc) and then dispatches the request to a different module based on the $r->path_info(). Apache::Dispatch could do this for you if you like. You could also just use httpd.co

Re: pnotes

2004-11-30 Thread Bart Simpson
> > Arshavir Grigorian wrote: > > > >> Hello list, > >> > >> I have module called Application which handles > all the requests to > >> the site (except for images, etc) and then > dispatches the request to > >> a different module based on the $r->path_info(). > >> > >> I am thinking about creati

Re: pnotes

2004-11-24 Thread Arshavir Grigorian
Stas Bekman wrote: Arshavir Grigorian wrote: Hello list, I have module called Application which handles all the requests to the site (except for images, etc) and then dispatches the request to a different module based on the $r->path_info(). I am thinking about creating a Template Toolkit object

Re: pnotes

2004-11-24 Thread Stas Bekman
Arshavir Grigorian wrote: Hello list, I have module called Application which handles all the requests to the site (except for images, etc) and then dispatches the request to a different module based on the $r->path_info(). I am thinking about creating a Template Toolkit object and a DBI handle

Re: Pnotes in apache2

2004-06-23 Thread Stas Bekman
Stas Bekman wrote: Kreimendahl, Chad J wrote: That's fine... I can definitely live with it. The docs should be updated, though... they say Apache::Table. right, i'll fix that. thanks for the persistence :) Now fixed: http://perl.apache.org/docs/2.0/api/Apache/RequestUtil.html#C_pnotes_ -- _

Re: Pnotes in apache2

2004-06-23 Thread Stas Bekman
Kreimendahl, Chad J wrote: That's fine... I can definitely live with it. The docs should be updated, though... they say Apache::Table. right, i'll fix that. thanks for the persistence :) Though they say APR::Table. Where did you see Apache::Table? -- _

RE: Pnotes in apache2

2004-06-23 Thread Kreimendahl, Chad J
That's fine... I can definitely live with it. The docs should be updated, though... they say Apache::Table. -Original Message- From: Geoffrey Young [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:36 PM To: Kreimendahl, Chad J Cc: Stas Bekman; [EMAIL PROTECTED] Subjec

Re: Pnotes in apache2

2004-06-23 Thread Geoffrey Young
Kreimendahl, Chad J wrote: > ok, but what I'm saying is... pnotes does NOT return an APR::Table > object... it's still working as it did back in mp1. The docs say what > you're saying, but it does not function that way. pnotes() will not return an APR::Table object for the same reason it doe

RE: Pnotes in apache2

2004-06-23 Thread Kreimendahl, Chad J
une 23, 2004 12:04 PM To: Kreimendahl, Chad J Cc: [EMAIL PROTECTED] Subject: Re: Pnotes in apache2 Kreimendahl, Chad J wrote: > So will mp2 pnotes eventually return APR::Table or will it continue to > function as it does now (which is the same as mp1)? there is no eventually, the curren

Re: Pnotes in apache2

2004-06-23 Thread Stas Bekman
Kreimendahl, Chad J wrote: So will mp2 pnotes eventually return APR::Table or will it continue to function as it does now (which is the same as mp1)? there is no eventually, the current behavior of modperl-1.99_14 is how it's going to be in mp2. Again the ultimate answer is here: http://perl.apac

RE: Pnotes in apache2

2004-06-23 Thread Kreimendahl, Chad J
So will mp2 pnotes eventually return APR::Table or will it continue to function as it does now (which is the same as mp1)? -Original Message- From: Stas Bekman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 11:57 AM To: Kreimendahl, Chad J Cc: [EMAIL PROTECTED] Subject: Re

Re: Pnotes in apache2

2004-06-23 Thread Stas Bekman
Kreimendahl, Chad J wrote: Well, apparently I was using the mp1 method to set the stuff in my Fixup handler... which is the part that is contrary to how the documentation says it works. Instead of returning an Apache::Table object, it returns the exact same was as it had in mp1... sub handler {

RE: Pnotes in apache2

2004-06-23 Thread Kreimendahl, Chad J
Well, apparently I was using the mp1 method to set the stuff in my Fixup handler... which is the part that is contrary to how the documentation says it works. Instead of returning an Apache::Table object, it returns the exact same was as it had in mp1... package MyFixupHandler; sub h

Re: Pnotes in apache2

2004-06-23 Thread Stas Bekman
Kreimendahl, Chad J wrote: Sorry, I mistyped. Was in too much of a hurry to get out of the office. I've set the value of monkey in PerlFixupHandler. Once I get to my PerlResponseHandler and: my $something = $r->pnotes; $something is an unblessed reference (instead of a ref to Table as in th

RE: Pnotes in apache2

2004-06-19 Thread Kreimendahl, Chad J
the docs). -Original Message- From: Stas Bekman [mailto:[EMAIL PROTECTED] Sent: Sat 6/19/2004 3:44 PM To: Kreimendahl, Chad J Cc: [EMAIL PROTECTED] Subject: Re: Pnotes in apache2 Kreimendahl, Chad J wrote: > Mak

Re: Pnotes in apache2

2004-06-19 Thread Stas Bekman
Kreimendahl, Chad J wrote: Make test does: t/modperl/pnotesok But, when attempting to create a pnotes (which is an APR::Table?) my $hashref = {}; my $pn = $r->pnotes(); my $ret = $pn->set('monkey' => $hashref); $ret is an unblessed hash ref... Should this be blessed back to