[phplib] Duplicate entry for insert into sessions From: Mike Green (Mike.Green <email protected>)
Date: 08/26/00

Every couple of days I'm getting a ton of this type of message:

MySQL Error: 1062 (Duplicate entry
'Fred_Session-7a69dd00f0d56324a3dbe8c4dce226c2' for key 1)
Database error: Invalid SQL: insert into fred_sessions ( sid, name, val,
changed ) values
('7a69dd00f0d56324a3dbe8c4dce226c2/index.html', 'Fred_Session',
'R2FyemFyZWxsaV9TZXNzaW9uOiR0aGlzLT5pbiA9ICcxJzsgJHRoaXMtPnB0ID0gYXJyYXkoKTsgJHRoaXMtPnB0WydhdXRoJ10gPSAnMSc7ICR0aGlzLT5wdFsnc191aWQnXSA9ICcxJzsgJHRoaXMtPnB0WydzX1JlbmV3J10gPSAnMSc7ICR0aGlzLT5wdFsnc19TdWJzY3JpYmVyTmFtZSddID0gJzEnOyAkdGhpcy0+cHRbJ3NfU3Vic2NyaXB0aW9uRW5kcyddID0gJzEnOyAkdGhpcy0+cHRbJ3NfSW52b2ljZU51bSddID0gJzEnOyAkR0xPQkFMU1snYXV0aCddID0gbmV3IEdhcnphcmVsbGlfQXV0aDsgJEdMT0JBTFNbJ2F1dGgnXS0+YXV0aCA9IGFycmF5KCk7ICRHTE9CQUxTWydhdXRoJ10tPmF1dGhbJ3VpZCddID0gJ25vYm9keSc7ICRHTE9CQUxTWydhdXRoJ10tPmF1dGhbJ3Blcm0nXSA9ICcnOyAkR0xPQkFMU1snYXV0aCddLT5hdXRoWydleHAnXSA9ICcyMTQ3NDgzNjQ3JzsgJEdMT0JBTFNbJ2F1dGgnXS0+YXV0aFsncmVmcmVzaCddID0gJzIxNDc0ODM2NDcnOyAkR0xPQkFMU1snc191aWQnXSA9ICcnOyAkR0xPQkFMU1snc19SZW5ldyddID0gJyc7ICRHTE9CQUxTWydzX1N1YnNjcmliZXJOYW1lJ10gPSAnJzsgJEdMT0JBTFNbJ3NfU3Vic2NyaXB0aW9uRW5kcyddID0gJyc7ICRH!

TE9CQUxTWydzX0ludm9pY2VOdW0nXSA9ICcnOyA=', '20000826073507')

I searched the list and found recommendations to either re-index or empty the
sessions table. I've tried both. The first was unsuccessful. The second
(which probably dumped a few users in the process) cured the problem for a
couple of days only.

I'm using phplib-7.2b. (The version Id line from my session.inc file is: * $Id:
session.inc,v 1.45.2.1 2000/03/23 11:23:59 kk Exp $) But I didn't see anything
at
http://phplib.netuse.de/cgi/cvsweb.cgi/php-lib-stable/CHANGES?rev=1.7&content-type=text/x-cvsweb-markup
which indicated a bug fix for this sort of thing.

I am not using session cookies. I.e. var $mode = "get" in my extension to
Session.

Any ideas?

And ...something I just noticed that is puzzling: where is the '/index.html'
appended to the session id coming from in the insert statement?

TIA!

Mike Green

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>