You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by David Hofmann <mo...@hotmail.com> on 2004/04/14 22:30:53 UTC

Apache::Session::Postgres Commit on ??

For some reason I keep getting a commit error.

commit ineffective with AutoCommit enabled at 
/usr/lib/perl5/site_perl/5.6.1/Apache/Session/Store/Postgres.pm line 92.

Here how I'm tieing, I have tried upper and lowercase on the commit:

unless ( eval { tie %sessionHash, 'Apache::Session::Postgres', $sid, {  
Commit => 0, Handle => $self->{'sql'}}; }) {
#  warn "  (MY::DBSession::_initialize) Invalid session cookie: $@";
  tie %sessionHash, 'Apache::Session::Postgres', undef, { Commit => 0, 
Handle => $self->{'sql'} };
  $sid = $sessionHash{_session_id};
}

Here my database call:

unless ($self->{'sql'}) {
  # add our all important database connection!
  $self->{'sql'} = DBI->connect( "dbi:Pg:dbname=sup","usename", "password")
     or &error('0','EN','CONNECT_SQL','CONNECT_SQL');
}

Any ideas ? It's not causing a problem but I hate errors in my log.

David

_________________________________________________________________
Check out MSN PC Safety & Security to help ensure your PC is protected and 
safe. http://specials.msn.com/msn/security.asp


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Apache::Session::Postgres Commit on ??

Posted by Perrin Harkins <pe...@elem.com>.
On Wed, 2004-04-14 at 20:37, Geoffrey Young wrote:
> > Here how I'm tieing, I have tried upper and lowercase on the commit:
> 
> >  tie %sessionHash, 'Apache::Session::Postgres', undef, { Commit => 0,
> 
> Commit => 0 should be AutoCommit => 0.

Actually, no.  This is an argument to Apache::Session::Postgres, not to
DBI.

I don't see anything wrong with the syntax of the Apache::Session call,
or the code in Apache::Session that handles this, so I'm not sure why
this would be happening.  I would add some debugging statements to
figure out if $self->{commit} is set correctly when you hit
Apache::Session::Postgres::DESTROY and work your way backward from
there.

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Apache::Session::Postgres Commit on ??

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> Here how I'm tieing, I have tried upper and lowercase on the commit:

>  tie %sessionHash, 'Apache::Session::Postgres', undef, { Commit => 0,

Commit => 0 should be AutoCommit => 0.

--Geoff

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html