![]() |
Cannot Create 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: Cannot Create Session (/showthread.php?tid=85871) |
Cannot Create Session - donpwinston - 12-14-2022 I've a situation where I cannot create a session. The exact same code works fine on another server. I don't know why this one doesn't work. Code: CRITICAL - 2022-12-14 19:54:46 --> ini_set(): Session ini settings cannot be changed after headers have already been sent RE: Cannot Create Session - InsiteFX - 12-14-2022 Somewhere in your code is outputing to the view before you create the session. Check your code for output to the screen ( view ). It means that the headers have already been sent before you used the session. Start at your BaseController and work upwards to your other Controllers. Place an ( exit(); ) in your code to check for the output to the view. RE: Cannot Create Session - donpwinston - 12-15-2022 (12-14-2022, 11:54 PM)InsiteFX Wrote: Somewhere in your code is outputing to the view before you create the session. Thanks. I had a <<?php in one of my app/Config/Boot files. |