On Sun, Jul 6, 2008 at 6:30 AM, Dr. Jennifer Nussbaum
<[EMAIL PROTECTED]> wrote:
>
>
> --- On Sun, 7/6/08, Tomas Doran <[EMAIL PROTECTED]> wrote:
>
>> From: Tomas Doran <[EMAIL PROTECTED]>
>> Subject: Re: [Catalyst] Duplicate session problem?
>> To: [EMAIL PROTECTED], "The elegant MVC web framework" 
>> <[email protected]>
>> Date: Sunday, July 6, 2008, 4:05 AM
>> On 5 Jul 2008, at 22:21, Dr. Jennifer Nussbaum wrote:
>>
>> > Now that i got my authentication routines working, im
>> running into
>> > another problem.
>> >
>> > Anything i do, i am getting elaborate "duplicate
>> session" errors;
>> > in my error
>> > log they show up as things like:
>> >
>> > DBI Exception: DBD::mysql::st execute failed:
>> Duplicate entry
>> > 'session:12a7c108ba07843441d5bed0' for key 1
>> [for Statement "INSERT
>> > INTO sessions (id) VALUES (?)" with ParamValues:
>> 0='session:
>> > 12a7c108ba07843441d5bed0467e3398a8e7c3f1'] at
>> /usr/share/perl5/DBIx/
>> > Class/Schema.pm line 954
>> >
>> > This happens just about constnatly. Im the only one
>> using the system,
>> > its just for testing now, so i dont expect any
>> collisions.
>>
>> <snip>
> <snip>

I'm actually more inclined to think that there is something wrong with
the database.  Due to your previous problem of the '0' vs. 0 returning
different data, which shouldn't happen, there is something else going
on with MySQL.

If you'll note, DBIC uses bind parameters which takes care of quoting:
SELECT me.id, me.login, me.password, me.access_level, me.email,
me.last_login, me.created, me.deleted FROM user me WHERE ( ( ( ( ( (
me.id = ? ) ) ) ) AND ( ( ( deleted IS NULL ) OR ( deleted = ? ) ) ) )
) ORDER BY login: '3', '0'

The ? mark means it is a bind param, and the quoting on '3' and '0' is
for display purposes.  From your previous message about the auth
framework, if that query isn't working out of the box there is some
other problem.

Is your MySQL database configured strangely, if you run these queries
do you get a valid record back?

SELECT me.id, me.session_data, me.expires, me.t FROM sessions me WHERE
( ( me.id = ? 'session:4f540dcae6da5bf8bc91b15f65bf6a34e16733a5' ) )
INSERT INTO sessions (id) VALUES
('session:4f540dcae6da5bf8bc91b15f65bf6a34e16733a5')
SELECT me.id, me.session_data, me.expires, me.t FROM sessions me WHERE
( ( me.id = 'session:4f540dcae6da5bf8bc91b15f65bf6a34e16733a5' ))

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to