pro_php thread: Re: Subject: Problem with sessions.
> Subject: Problem with sessions.
> From: emmet.mccarthy@w...
> Date: Mon, 2 Jul 2001 11:14:40 +0200
> X-Message-Number: 1
>
>
> Hi there everybody,
> I'm having some trouble with sessions and I hope someone can help me.I've
> made a site which requires sessions. Testing
> here on our network was no problem, but when uploaded it appears that the
> session is trying to start itself twice (because of
> the duplicate entry). This is the error I'm receiving.
>
> Database error: Invalid SQL: insert into active_sessions ( sid, name,
val,
> changed ) values
> ('5832df450cbe62d21b7e5edc77935416', 'hsid',
>
'aHNpZDokdGhpcy0+aW4gPSAnMSc7ICR0aGlzLT5wdCA9IGFycmF5KCk7ICR0aGlzLT5wdFsnd
> XNlcm5hbWUnX
>
SA9ICcxJzsgJHRoaXMtPnB0WydrZW5ud29ydCddID0gJzEnOyAkdGhpcy0+cHRbJ3ByaXZpbGV
> nZSddID0gJzEnOy
>
AkR0xPQkFMU1sndXNlcm5hbWUnXSA9ICdib2JvJzsgJEdMT0JBTFNbJ2tlbm53b3J0J10gPSAn
> cGF1bCc7ICRHTE
>
9CQUxTWydwcml2aWxlZ2UnXSA9IGFycmF5KCk7ICRHTE9CQUxTWydwcml2aWxlZ2UnXVsnMCdd
> ID0gJ1JPT1
> RfQURNSU4nOyAkR0xPQkFMU1sncHJpdmlsZWdlJ11bJzEnXSA9ICcwJzsg',
'200107020454
> 06')
> MySQL Error: 1062 (Duplicate entry
'hsid-5832df450cbe62d21b7e5edc77935416'
> for key 1)
> Database error: Session: freeze() failed.
> MySQL Error: 1062 (Duplicate entry
'hsid-5832df450cbe62d21b7e5edc77935416'
> for key 1)
>
>
> I should point out that it was developed locally with PHP3 and phplib,
but
> the server it has to run on has PHP4 installed.
> Even so, the prepend.php3 file is installed at the server. Also, the
error
> does not always appear, only most of the time. It's
> probably a PHP3 & phplib / PHP4 conflict but I don't know why. Maybe
someo
> ne out there has had a similar problem
> before. Any help would be appreciated.
> Thanks a mill,
> Emmet
>
> Emmet Mc Carthy
> WAYTOHERE GmbH(Programmierung)
> Schlei=DFheimerstr. 41
> 80797 M=FCnchen
> Tel: (089) 12700888
> Fax: (089) 12700889
> e-mail: info@w...
>
> ----------------------------------------------------------------------
Yeah I've had this. Seems like the active_sessions table might have been
corrupted - server crashed and rebooted mid-session maybe. If it persists
you need to clean up the table. I used this (for an old version of mysql):
cd /usr/local/mysql/bin
./isamchk -w -o -e -a ../data/dbnamehere/active_sessions.ISM