ci_session table problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: ci_session table problem (/showthread.php?tid=19039) |
ci_session table problem - El Forum - 05-26-2009 [eluser]Unknown[/eluser] Hi, Keep my data in session but session limit is 4K.therefore i must use ci_session table. however, i have a problem for using ci_session table. using 1.7.0 version. when i use ci_session, table user_data colon is empty. i can explain step by step; 1. config file change like this; $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_encrypt_cookie'] = FALSE; $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; 2. create table in db (oracle DB) Code: CREATE TABLE CI_SESSIONS 3. Example code for using session; Code: class Proje extends Controller { P.C. using lots of data keep in session until 4K limit. Limit is full data does not keep in session. 4. For this problem use table but table does not keep session data example of table data; session_id : 213c269cbfd13d40766e2a94392a289c ip_address: 127.0.0.1 user_agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; last_activity: 1243264075 user_data: a:4:{s:8:"username";s:6:"UB7163";s:14:"kullanicibilgi";a:0:{}s:9:"userbirim";s:0:"";s:11:"useradsoyad";s:0:"";} P.C. Only save username data in to user_data colon. other variables don't save because of get data from db table. if you reply and solve my topic as soon as possible i will be glad. THANKS. ci_session table problem - El Forum - 05-26-2009 [eluser]Unknown[/eluser] i found my problem but i didn't solve. Somebody can help me ? Get data from DB in model functions. When i use session table to set this data in session, data is empty. Like this; Without ci_session table run is normal Code: class Proje extends Controller { for ci_session table code; Code: class Proje extends Controller { i must use data from db and use ci_session table because of session limitation (4K) help me. ci_session table problem - El Forum - 05-27-2009 [eluser]attos[/eluser] Your problem is in how the USER_DATA column is declared. Oracle limits the VARCHAR2 to 4000 bytes. Quote:USER_DATA VARCHAR2(3000 BYTE) You should change the data type to either CLOB (Character Large Object), NCLOB (National Character Large Object) or BLOB (Binary Large Object). |