![]() |
strange session class 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: strange session class problem (/showthread.php?tid=22579) |
strange session class problem - El Forum - 09-14-2009 [eluser]gfields[/eluser] Hi, i've a strange problem related to the session class in codeigniter. in a simple controller i check the session for a variable called "sess-language". If it doesn't exist i set the variable. i've created a view to test the code. it works. but if i add html code to the view the session stops working, and everytime I load another page the session seems to be reinitialized. But the session_id doesn't change at all. Any idea? Thanx Kingcole strange session class problem - El Forum - 09-14-2009 [eluser]InsiteFX[/eluser] It would help to see your Controller and View code! Enjoy InsiteFX strange session class problem - El Forum - 09-15-2009 [eluser]gfields[/eluser] Ok, I attach my simple application directory to the post. The controller HOME loads views "home" and "footer". if I add more html code in the "home" view, the session language variable (you can check it on the top of the page) stops working strange session class problem - El Forum - 09-15-2009 [eluser]InsiteFX[/eluser] Hi, I have look at the code you sent, and so far this is what I found: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> The forums took one of your <li> lines out. Let me know if that fixes the problem Also I would use the database sessions. Enjoy InsiteFX strange session class problem - El Forum - 09-16-2009 [eluser]gfields[/eluser] Hi, thank you for the help. I know that in my view code misses all the html stuff. Was only for testing purpose. If I add all the html code to my page the session stops working. But it happens only with that code. If I write anything else the session works. Misteriously. I debugged with netbeans-xdebug and noting strange seems to happen. The question is, can a bad html code reset the session? ciao Gfields strange session class problem - El Forum - 09-16-2009 [eluser]InsiteFX[/eluser] Try adding a ob_start(); just below the top <?php tag in your Controller IF sessions quit working do you get any error messages? Enjoy InsiteFX |