Lost session |
(04-21-2018, 08:50 AM)dave friend Wrote: I think you are asking the right question. Something in the session config is not correct resulting in "lost" sessions. following the current codeigniter Doc, u might get things wrong. i look inward of the code. $sessionDriver is expected to be a class
This is how my Sessions are configured.
PHP Code: public $sessionDriver = 'CodeIgniter\Session\Handlers\FileHandler'; What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Try one of these in your Ajax and see if it makes any difference.
NOTE: Code: $_SERVER['HTTP_X_REQUESTED_WITH'] is the golden ticket but not all servers provide this variable Try: Code: request.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); Let me know what happens. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
I looked at the CI 4 Session.php file and it does check for 'X-Requested-With' in it.
Are you using the newest version of CI 4? Use the developers tools in your browser to see what is happening. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Also please make sure you're using the latest version of the develop branch.
|
Welcome Guest, Not a member yet? Register Sign In |