Skip Menu |
 

This queue is for tickets about the CGI-Session CPAN distribution.

Report information
The Basics
Id: 30707
Status: resolved
Priority: 0/
Queue: CGI-Session

People
Owner: MARKSTOS [...] cpan.org
Requestors: steve.kieu [...] ird.govt.nz
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bug Report: Can't locate object method "generate_id" when using mysql driver
Date: Wed, 14 Nov 2007 11:14:40 +1300
To: bug-CGI-Session [...] rt.cpan.org
From: Steve Kieu <steve.kieu [...] ird.govt.nz>
Download (untitled) / with headers
text/plain 756b
Hello, I installed monarch (a nagios configuration front end) and I can not login. Debuging shows that error message: Can't locate object method "generate_id" via package "CGI::Session::ID::" (perhaps you forgot to load "CGI::Session::ID::"?) at /usr/lib/perl5/site_perl/5.8.8/CGI/Session.pm line 74., referer: http://nagtst01/monarch/cgi-bin/monarch.cgi digging in the monarch code it uses:in MonarchStorProc.pm use CGI::Session qw/-ip-match/; the error happend when execute the below line: my $session = new CGI::Session("driver:MySQL", undef, {Handle=>$dbh}); $dbh is db handle and I have tested it; it is ok. The version having problem is: 4.20. Downgrading CGI::Session to 4.10 will solve the problem. I hope this helps. Regards,
Subject: Re: [rt.cpan.org #30707] Bug Report: Can't locate object method "generate_id" when using mysql driver
Date: Tue, 13 Nov 2007 23:14:13 -0500
To: bug-CGI-Session [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Download (untitled) / with headers
text/plain 1.3k
Show quoted text
> I installed monarch (a nagios configuration front end) and I can not > login. Debuging shows that error message: > > Can't locate object method "generate_id" via package > "CGI::Session::ID::" (perhaps you forgot to load "CGI::Session::ID::"?) > at /usr/lib/perl5/site_perl/5.8.8/CGI/Session.pm line 74., referer: > http://nagtst01/monarch/cgi-bin/monarch.cgi > > > digging in the monarch code it uses:in MonarchStorProc.pm > > use CGI::Session qw/-ip-match/; > > the error happend when execute the below line: > my $session = new CGI::Session("driver:MySQL", undef, {Handle=>$dbh}); > > > $dbh is db handle and I have tested it; it is ok. > > The version having problem is: 4.20. Downgrading CGI::Session to 4.10 > will solve the problem.
I'm sorry this didn't work for you, but I think you were using an undocumented feature in the the past, rather than experiencing a bug in the present. I think the driver name should be lower case: "mysql". I can't see that the docs say otherwise: http://search.cpan.org/~markstos/CGI-Session-4.20/lib/CGI/Session.pm#new() If you can find documentation that we supported "MySQL", I'll consider changing the code. However, if it seems the documentation wasn't being followed, I'm less inclined to consider it a bug, since it seems fair for undocumented behavior to change over time. Mark
Subject: Re: [rt.cpan.org #30707] Bug Report: Can't locate object method "generate_id" when using mysql dr
Date: Thu, 15 Nov 2007 10:25:50 +1300
To: <bug-CGI-Session [...] rt.cpan.org>
From: "Steve Kieu" <Steve.Kieu [...] ird.govt.nz>
Download (untitled) / with headers
text/plain 831b
Hello Mark, The monarch code is in origin. However I have tried to change to mysql in lower case which does not help. And I tried to run as a test case in perl and got the same error. If you try this code: perl -e 'use CGI::Session; $s = CGI::Session->new("driver:mysql", $sid, undef);' With version 4.10 no error. With version 4.20. got: Can't locate object method "generate_id" via ..... So I am sure this is still a bug. Regards, I'm sorry this didn't work for you, but I think you were using an undocumented feature in the the past, rather than experiencing a bug in the present. I think the driver name should be lower case: "mysql". I can't see that the docs say otherwise: http://search.cpan.org/~markstos/CGI-Session-4.20/lib/CGI/Session.pm#new() Steve Kieu <steve.kieu@ird.govt.nz>
Subject: Re: [rt.cpan.org #30707] Bug Report: Can't locate object method "generate_id" when using mysql dr
Date: Thu, 15 Nov 2007 10:27:26 -0500
To: bug-CGI-Session [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Download (untitled) / with headers
text/plain 1.2k
On Wednesday 14 November 2007 16:48, Steve Kieu via RT wrote: Show quoted text
> Queue: CGI-Session > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=30707 > > > > Hello Mark, > > The monarch code is in origin. However I have tried to change to > mysql in lower case which does not help. And I tried to run as > a test case in perl and got the same error. > > If you try this code: > > perl -e 'use CGI::Session; $s = > CGI::Session->new("driver:mysql", $sid, undef);' > > With version 4.10 no error. > With version 4.20. got: > > Can't locate object method "generate_id" via .....
Steve, After unpacking a fresh 4.20 distribution, does "make test" pass? You may need to set an environment variable to trigger the MySQL tests. We do have tests for the MySQL driver, and I'm sure we have tests for something this fundamental. If all the tests pass, please modify a test or add a new test to the suite that demonstrates your bug. I suspect there is something different about your environment with 4.20, like a missing module. If there is a bug, I'd like to get it fixed, but as you are reporting it, it would impact many, many people and is difficult to see how it could not have caught by the test suite, and been reported already by another user. Mark
Subject: Re: [rt.cpan.org #30707] Bug Report: Can't locate object method "generate_id" when using mysql dr
Date: Mon, 19 Nov 2007 13:33:08 +1300
To: <bug-CGI-Session [...] rt.cpan.org>
From: "Steve Kieu" <Steve.Kieu [...] ird.govt.nz>
Download (untitled) / with headers
text/plain 1.6k
Hello, I make test and set the test environment ; the test passed for g4_mysql ; What a strange thing is, after I make install; the error gone away. I think it overwrites the old version of Session.pm. Regards, Steve Kieu <steve.kieu@ird.govt.nz> Show quoted text
>>> "mark@summersault.com via RT" <bug-CGI-Session@rt.cpan.org>
16/11/2007 4:27 a.m. >>> <URL: http://rt.cpan.org/Ticket/Display.html?id=30707 > On Wednesday 14 November 2007 16:48, Steve Kieu via RT wrote: Show quoted text
> Queue: CGI-Session > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=30707 > > > > Hello Mark, > > The monarch code is in origin. However I have tried to change
to Show quoted text
> mysql in lower case which does not help. And I tried to run
as Show quoted text
> a test case in perl and got the same error. > > If you try this code: > > perl -e 'use CGI::Session; $s = > CGI::Session->new("driver:mysql", $sid, undef);' > > With version 4.10 no error. > With version 4.20. got: > > Can't locate object method "generate_id" via .....
Steve, After unpacking a fresh 4.20 distribution, does "make test" pass? You may need to set an environment variable to trigger the MySQL tests. We do have tests for the MySQL driver, and I'm sure we have tests for something this fundamental. If all the tests pass, please modify a test or add a new test to the suite that demonstrates your bug. I suspect there is something different about your environment with 4.20, like a missing module. If there is a bug, I'd like to get it fixed, but as you are reporting it, it would impact many, many people and is difficult to see how it could not have caught by the test suite, and been reported already by another user. Mark


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.