Session makes no updates in the method sess_write() - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Session makes no updates in the method sess_write() (/showthread.php?tid=60158) |
Session makes no updates in the method sess_write() - El Forum - 01-27-2014 [eluser]mayconfsbrito[/eluser] Hi! I've a big problem in my application. The first page which does a insert in $CI->session->userdata doesn't update the database, but the update method of Active Record returns 1 (or true). So, my session wasn't recorded in database at the first time, but on a second attempt was recorded. I did a test on the method sess_write() in the CI_Session class, selecting with the Active Record the record of the current session. The result shown by the Active Record was the same of updated, but when I checked at the database with PHPmyadmin, the record of this session in ci_session table wasn't upgraded. Exemple: Code: function sess_write() Somebody can help me? Session makes no updates in the method sess_write() - El Forum - 01-27-2014 [eluser]InsiteFX[/eluser] You should only be updating the session user array none of the other values CI maintains them. Session makes no updates in the method sess_write() - El Forum - 01-28-2014 [eluser]mayconfsbrito[/eluser] Hi InsiteFX, I don't understand what you say. Can you explain me better? For tests, I have inserted a sleep(1); after the update() of the session in the sess_write() function, and the system worked perfectly updating the session. Which may be related to this? |