CodeignitEr Session not working with AJAX

前端 未结 1 881
南旧
南旧 2021-01-17 02:33

The issue here is I am trying to login into my system via ajax. Let me explain it to your first.

when my user puts in his login details it will be send to the server

相关标签:
1条回答
  • 2021-01-17 03:03

    If you’ve used AJAX-heavy web apps built on a CI backend, you might have noticed premature session expiration, even if you’re expiration was set to never expire ($config['sess_expiration'] = 0; in application/config/config.php)

    This was apparently due to AJAX requests not regenerating sessions, and apparent collisions. Long story short, last month there was a patch introduced without much fanfare, which (so far) seems to be working for me.

    Replace your system/libraries/Session.php file with the one found here (CI’s git):

    https://raw.github.com/EllisLab/CodeIgniter/b211adee89f5fd2192051e9c0826146bd150f469/system/libraries/Session.php

    0 讨论(0)
提交回复
热议问题