• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Session cookie database, multiple records

#1
[eluser]truman_truman[/eluser]
Hey, do not speak English, I am translating with google, sorry for that.
The problem is that I am using database sessions, and at login, are stored in the database records several cookies (session_id). Whenever income generated page 3 or 4 records in the database.
Worth mentioning that I am in: mydominio.com/folder/folder
Anyone have an idea of the problem? thanks

$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_expire_on_close'] = TRUE;
$config['sess_encrypt_cookie'] = TRUE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;

$config['cookie_prefix'] = "";
$config['cookie_domain'] = "";
$config['cookie_path'] = "/";
$config['cookie_secure'] = FALSE;








español:
Hola, no hablo inglés , estoy traduciendo con google, perdon por ello.
El problema es que estoy usando sesiones con base de datos, y al hacer login, se guardan en la base de datos varios registros de las galletas ( session_id ) . Cada vez que ingreso a la página se generan 3 o 4 registros en la base de datos.
Vale aclarar que estoy en midominio.com/carpeta/carpeta
Alguien tiene una idea del problema? Gracias

#2
[eluser]CroNiX[/eluser]
Try removing the underscore from the sess_cookie_name, like "cisession". Are you having problems in all browsers, or just a specific one?

#3
[eluser]truman_truman[/eluser]
In all browsers is the same.
I did what you said and the problem persists.
Each looks to refresh the page generates a new record in the db.


(En todos los navegadores pasa lo mismo.
Hice lo que me dijo y el problema persiste.
Cada ve que refresco la pagina se genera un nuevo registro en la db.)

#4
[eluser]truman_truman[/eluser]
Solved. The problem was that I had created the db table, copying and pasting from the codeigniter manual, which is translated into Spanish, surely has some error.
Now I copied from the official and working properly, thanks, greetings.

CREATE TABLE IF NOT EXISTS `ci_sessions` (
session_id varchar(40) DEFAULT '0' NOT NULL,
ip_address varchar(45) DEFAULT '0' NOT NULL,
user_agent varchar(120) NOT NULL,
last_activity int(10) unsigned DEFAULT 0 NOT NULL,
user_data text NOT NULL,
PRIMARY KEY (session_id),
KEY `last_activity_idx` (`last_activity`)
);


(Solucionado. El problema era que yo había creado la tabla de la db, copiando y pegando desde el manual de codeigniter, que está traducido al español, seguramente tiene algun error.
Ahora lo copié de la pagina oficial y funciona correctamente, gracias, saludos.)


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.