Re: [phplib] Problem with sessions, MySQL insert error. From: francis bouchard (fbouchard <email protected>)
Date: 08/02/00

I have the axact same problem and still not have the answer! I posted
yesterday
You can serach header for page_close()

If I find anything i'll let you know

----- Original Message -----
From: Jacob Bower <jake.b <email protected>>
To: <phplib <email protected>>
Sent: Thursday, August 03, 2000 12:02 AM
Subject: [phplib] Problem with sessions, MySQL insert error.

Originally I was using PHP4 for its built in sessioning capabilities,
however I found that PHP4 appears to have a few bugs that cause it to corupt
data when interfacing with MS SQL using freetds. So now I am using PHP3 and
PHPLIB just for sessioning.

However I am randomly recieveing these error messages at the bottom of my
pages when I call page_close()

>>Begin error<<

Database error: Invalid SQL: insert into active_sessions ( sid, name, val,
changed ) values ('bbdf5649e59b6d4c53d5187000fa378b', 'session',
'c2Vzc2lvbjokdGhpcy0+aW4gPSAnJzsgJHRoaXMtPnB0ID0gYXJyYXkoKTsgJHRoaXMtPnB0Wyd
QSFBfQVVUSF9VU0VSJ10gPSAnMSc7ICR0aGlzLT5wdFsnUEhQX0FVVEhfUFcnXSA9ICcxJzsgJEd
MT0JBTFNbJ1BIUF9BVVRIX1VTRVInXSA9ICdqYWtlJzsgJEdMT0JBTFNbJ1BIUF9BVVRIX1BXJ10
gPSAnbm9uZSc7IA==', '20000802095432')
MySQL Error: 1022 (Can't write, duplicate key in table 'active_sessions')
Session halted.

>>end error<<

I have tried deleteing all the records in the 'active_sessions' table, but I
still seem to get this error fairly frequently. Please can someone suggest
what I can do.

I am using PHPLIB-7.2c, PHP 3.0.16 compile as a DSO for apache 1.3.12.

Any help appreciated.

- Jake

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