COOKIE 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: COOKIE PROBLEM (/showthread.php?tid=34757) |
COOKIE PROBLEM - El Forum - 10-08-2010 [eluser]Paulodemoc[/eluser] Hello everybody. I am trying to set a cookie on user login, I call it ccmdata, with expiration of 2 hours. But for some reason it isn't working. I tried to do var_dump to see the return. If I use set_cookie, it is returning NULL but if I use setcookie (native PHP function), it returns TRUE. But no matter how long I navigate or refresh the page, the cookie isn't created... I use developer tools on firefox to see the cookies. The CI cookie is being created normally. Even some other cookies of the auth class are being created (like remember_me), but this one isn't. Anyone here might know what is going on? .-. COOKIE PROBLEM - El Forum - 10-08-2010 [eluser]pickupman[/eluser] I know it may seem trivial, but want to post some code on how your setting it? Also cookie's do have a maximum amount of data to hold (4kb). Have you tried storing session/cookie information in the database, which is a little more secure unless you encrypting your cookie. |