I'm developing a project with a small client area with the Silex framework. I want to store the session in database using the SessionServiceProvider and PdoSessionHandler but when I try to login with a test account the session is written in the database but the login is not done correctly and I get the login page in a loop. Also I'm getting the following error in the error log
Uncaught exception 'PDOException' with message 'SQLSTATE[22021]: Character not in repertoire: 7 ERROR: invalid byte sequence for encoding "UTF8"
The sessions table looks like this (got it from the Silex documentation page):
CREATE TABLE sessions (
sess_id VARCHAR(255) NOT NULL,
sess_value TEXT NOT NULL,
sess_time INTEGER NOT NULL,
PRIMARY KEY(sess_id)
);
Anyone can help?
0 comments:
Post a Comment