CodeIgniter Forums
how to turn off session - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: how to turn off session (/thread-29596.html)



how to turn off session - El Forum - 04-14-2010

[eluser]scieck[/eluser]
Does anybody knows a way to completely turn off cookies and sessions in CI ?


how to turn off session - El Forum - 04-15-2010

[eluser]flaky[/eluser]
simply, don't load it


how to turn off session - El Forum - 04-15-2010

[eluser]eoinmcg[/eluser]
by default codeigniter doesn't initiate sessions or send any cookies. so to answer your question you don't need to do anything - they are turned off.


how to turn off session - El Forum - 04-15-2010

[eluser]scieck[/eluser]
thanks,
I inherited a project running on CI, I built a REST API on top of it, I don't have full knowledge of the code base yet. I can see from the HTTP headers that session cookies are passed in the responses and as I am not "loading it (session)" in the REST section I wrote it means the session is initiated somewhere else.
I'll look for it, thanks again.


how to turn off session - El Forum - 04-15-2010

[eluser]eoinmcg[/eluser]
take a look in:
application/config/autload.php

if it's not there, check if the Controller class has been extended and loads it:
/application/libraries/MY_Controller.php


how to turn off session - El Forum - 04-15-2010

[eluser]scieck[/eluser]
[quote author="eoinmcg" date="1271333614"]take a look in:
application/config/autload.php
[/quote]
Thank you, as you said, it was in fact in the
Code:
$autoload['libraries'] = {...}
array.