Welcome Guest, Not a member yet? Register   Sign In
Losing session data
#11

[eluser]David BoreaNaz[/eluser]
still no go there...
i reset the values (from Session.php controller) to:
Code:
var $sess_encrypt_cookie        = FALSE;
    var $sess_use_database        = FALSE;
    var $sess_table_name        = '';
    var $sess_expiration        = 3600;
    var $sess_match_ip        = FALSE;
    var $sess_match_useragent    = TRUE;
    var $sess_cookie_name        = 'ci_session';
    var $cookie_prefix        = '';
    var $cookie_path            = '';
    var $cookie_domain        = '';
    var $sess_time_to_update        = 600;

leaving sess_expiration to match and sess_time_to_update, so that they match what's on config.php configuration. still same result...

InsiteFX, were you using Oracle database in your application? I am just curious, because if I use MySQL database, I do not get this error...
#12

[eluser]billmce[/eluser]
[quote author="David BoreaNaz" date="1269320857"][quote author="billmce" date="1269302443"]Interest, I solved my problem by changing from cookies to the database method of storing session info.
I made no other changes ... everything works.

Hours down the drain on that issue.

Seems that if you're using cookies, the session data is lost when the original function is reload.[/quote]

hi! may i butt in?
i also experience losing session data...
what is the database you are using?
i am trying to do this CI sessions + oracle database...
i hope someone can help me with this...[/quote]

I'm using mysql.
As I said ... using cookies I lost session data when the function was reloaded.
Using mysql everything works as expected.
#13

[eluser]InsiteFX[/eluser]
Try changing the below:

$sess_time_to_update = 7200;

Enjoy
InsiteFX
#14

[eluser]David BoreaNaz[/eluser]
regarding my problem,
on clicking a link after i logged in into the system...
the session gets destroyed. as i understand it, i don't need to pass said session id (or anything) in order to check if one has succesfully logged in... is this right?
#15

[eluser]InsiteFX[/eluser]
A very good auth library is Adam Griffiths Auth 1.0.6

Auth 1.0.6

I would download this and look at the code.

Enjoy
InsiteFX
#16

[eluser]KLODEnet di Stefano Surricchio[/eluser]
The right way to use the cookie, in order to maintain session data, is to set session and cookies related variables in the config.php file, like this:

Code:
$config['sess_cookie_name'] = 'name_of_session';
$config['sess_expiration'] = 0;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie'] = TRUE;
$config['sess_use_database'] = FALSE;
$config['sess_table_name'] = 'ci_session';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = FALSE;
$config['sess_time_to_update'] = 300;

$config['cookie_prefix'] = "nameofcookie_";
$config['cookie_domain'] = ".nameofdomain.com";
$config['cookie_path']  = "/";
$config['cookie_secure'] = FALSE;

This works like a charm for me.


Best regards.




Theme © iAndrew 2016 - Forum software by © MyBB