Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
[Solved] Session throwing duplicate primary key error (trying to make 2 sessions)
tw12lve
November 2012
[ Leaving this here in case someone else is having this problem ]
I was using the Session class with the DB driver. When asking for a new session and you don't have the session cookie identifier, it would throw a
"
Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation"
It looked like the shutdown event was happening twice. It was.
Since 1.3, the index.php file in the /public directory, doesn't manually call
Event::shutdown();
Solution: Just remove that line and no more duplicate shutdown events; no more duplicate inserts, no more errors!
:)
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52