![]() |
Lost session - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Lost session (/showthread.php?tid=70509) |
RE: Lost session - scalla - 04-21-2018 (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 RE: Lost session - InsiteFX - 04-21-2018 This is how my Sessions are configured. PHP Code: public $sessionDriver = 'CodeIgniter\Session\Handlers\FileHandler'; RE: Lost session - scalla - 04-21-2018 same way i made mine, but seems the session does not role well it ajax RE: Lost session - InsiteFX - 04-22-2018 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. RE: Lost session - scalla - 04-22-2018 still same behaviour RE: Lost session - InsiteFX - 04-22-2018 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. RE: Lost session - kilishan - 04-22-2018 Also please make sure you're using the latest version of the develop branch. RE: Lost session - scalla - 04-23-2018 (04-22-2018, 02:56 PM)InsiteFX Wrote: I looked at the CI 4 Session.php file and it does check for 'X-Requested-With' in it. would look into that RE: Lost session - scalla - 04-23-2018 (04-22-2018, 07:50 PM)kilishan Wrote: Also please make sure you're using the latest version of the develop branch. you sure bet, am always updated RE: Lost session - scalla - 04-23-2018 (04-22-2018, 02:56 PM)InsiteFX Wrote: I looked at the CI 4 Session.php file and it does check for 'X-Requested-With' in it. I looked into it, it shows nothing of value |