Welcome Guest, Not a member yet? Register   Sign In
Sessions
#1

[eluser]Julius Romo[/eluser]
Hi again...

I am starting with sessions in CI, and I look for the cookie stored.... but I don't find it...

Where is the cookie stored?
#2

[eluser]pistolPete[/eluser]
Depending on your configuration, the dat is only saved on the users computer (like any other cookie) or additionally in the database.
#3

[eluser]Julius Romo[/eluser]
I have no activated database.... and I have opened cookies directory... there, it would have been something like:

xxxxxxx@ci_session[2].txt

But I dont find it

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

autoloaded session library
#4

[eluser]Julius Romo[/eluser]
I have just changed to a table stored session, just to try to understand it more.

I have added some data in it. (Player number, for example).

My question is... if I can't find cookie... how does the page know who is loading the page? Have I to pass session id between links or as it is generated with "user's pc making-off", the controllers take the information automatically?
#5

[eluser]Dzoni[/eluser]
If you opt for cookie based sessions, all data is stored on your visitor's computer. The method of storing cookies depends on the browser.

Firefox stores cookies in:
C:\Documents and Settings\USERNAME\Application Data\Mozilla\Firefox\Profiles\RANDOM_STRING.default

Internet Explorer stores them in:
C:\Documents and Settings\USERNAME\Cookies

When someone visits your website, CodeIgniter Sessions library is pulling out data from these files. Because they are stored locally, it's not recommended to store sensitive information (passwords etc.) using sessions library. Even though you can use encryption, malicious users can interfere with this data. It's a good practice to use native PHP sessions to store user IDs, passwords etc.




Theme © iAndrew 2016 - Forum software by © MyBB