CI 3.02 - sess_use_database error |
Hi.
I am receiveing an error where I try to put an array of data in session. It's an error that says that there is an error on UPDATE query for the session table, but my CodeIgniter is not using database session, but files instead. Code: Error Number: 1064 The error ocurred in library/Session.php line 289. Then I went to that line and I saw that CodeIgniter checks if the user is using database in session trought that line: 256: PHP Code: // Are we saving custom data to the DB? If not, all we do is update the cookie Then I noted that there is no "sess_use_database" index in config.php anymore, so I just added this index set it to FALSE and all worked. Like this in config.php PHP Code: $config['sess_use_database'] = FALSE; Why there is no that option anymore in config.php file if the Session.php class uses that? Sorry my english. Fabio
You didn't follow the upgrade instructions carefully and you're still using the CI2 Session class.
(10-09-2015, 02:34 AM)Narf Wrote: You didn't follow the upgrade instructions carefully and you're still using the CI2 Session class. But what I didn't understand is why CI3 is looking for a database session driver if in previous version I was not using session with database. And why this code still remains there if options do not exist anymore in config file. PHP Code: if ($this->sess_use_database === FALSE) To do that upgrade, I must add that option in config.php file? PHP Code: $config['sess_use_database'] = FALSE; Thank you. Fabio
There are upgrade instructions that, as I said, you didn't follow carefully (if you did at all).
On the very first step, there's an important note that you've ignored, which is to delete the old files and not just copy-paste over them. That's where your problem comes from. (10-09-2015, 10:03 AM)Narf Wrote: There are upgrade instructions that, as I said, you didn't follow carefully (if you did at all). Ok, I'll try that, thank you. Fabio |
Welcome Guest, Not a member yet? Register Sign In |