ini_set(): A session is active |
Code: Severity: Warning My system : PHP 7.3.11 on Mac OS Catalina After upgrading from CI 2.2.1 to 3.1.11 version I keep getting these Warnings, I have no session_start() calls in my code, if I set ENVIRONMENT = production the warnings stop, I need to keep ENVIRONMENT = development to test the app but I can't remove these warnings from sessions. My Session config: PHP Code: $config['sess_driver'] = 'files'; I tried commenting session_start() on line 143 of "system/libraries/Session/Session.php" and the warnings stop, but I don't think that's a good solution. I removed the system folder and pasted the system 3.1.11 version into my app, followed all upgrading instructions on https://www.codeigniter.com/userguide3/i...e_300.html Could this be a php 7.3.11 problem?
Do you load the session library multiple times? If you need it everywhere you should only use the autoload.
Did you replace the complete session folder under system?
Either that or like @jrelund is stating is that you are starting the session in another place in your code. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Yes, I removed the system folder and replaced with the 3.1.11 folder after that, I'm not calling session_start() anywhere else in my project, as I said, I only call session in 'autoload' file
Create a MY_Controller and extend the Home Controller from the MY_Controller.
Take the session out of autoload and load it in the MY_Controller and see if the problem changes. I' am just trying to see if the problem has to do with the session being autoloaded. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(06-02-2020, 02:58 PM)fabianoc Wrote: No, I don'tGood to know. But you do load session in application/config/autoload.php using a call something like this? PHP Code: $autoload['libraries'] = array('session'); (There may be other items in the array, but that is not important.)
Exactly! That's the only place I load Session Lib
$autoload['libraries'] = array('database', 'session', 'table''); |
Welcome Guest, Not a member yet? Register Sign In |