CodeIgniter Forums
cookies/sessions getting right on my tits - 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: cookies/sessions getting right on my tits (/showthread.php?tid=21186)



cookies/sessions getting right on my tits - El Forum - 08-02-2009

[eluser]richthegeek[/eluser]
Previously had no problems with sessions/cookies but now they are giving me major grief...

I cant seem to get them to be set.

User login goes liek this:
/login (routes to customer/Auth::login())
submits to /login (same route) which checks for post and calls Auth::_login_exec();
Auth::_login_exec() calls the Model method Authorisation::login();
Authorisation::login() checks the db and if the user exists, calls Authorisation:Confusedet_cookies( a, b ); where a and b are two sha1 hashes. set_cookies sets two cookies.

Now the problem is that set_cookies doesnt seem to actually set any cookies??

I've tried it using:
$this->session->set_userdata using files
$this->session->set_userdata using database
set_cookie (the cookie helper method)
setcookie (the PHP native method)

None of these work and its driving me up the fracking wall. Cookies work elsewhere on the same server??


cookies/sessions getting right on my tits - El Forum - 08-02-2009

[eluser]richthegeek[/eluser]
and of course the problem was that i am a retard... forgot to add the current time() to the desired lifetime of the cookie.


cookies/sessions getting right on my tits - El Forum - 08-03-2009

[eluser]philm[/eluser]
hehe, glad we could help! Tongue