SESSION: ci_sessions database table not populating |
I've been pulling my hair out over this for days. I posted a similar post earlier but it wasn't laid out properly i think. I really need detailed information on how to proceed instead of hints on where the look please.
First of all i downloaded 3.0.1 and built some simple pages from scratch to see if i could get sessions working. Basically i set sessions in config to be database, and i set the database name as ci_sessions. I load the ci_sessions table. When i go to autoload sessions, when user starts using the website (right now i'm running it locally using WAMP so i'm the only user), i get an error message whenever i load the page. Also, ci_sessions table in a_cfg database does not populate at all when i autoload 'session' or try loading a page that tries to set some session variables. This is the error message: Code: A Database Error Occurred SOMEBODY indicated it might have something to do with "Filename: libraries/Session.php" but did not say what so i had no idea how to fix it. It looks like its trying to write information to the PREVIOUS version of ci_sessions table based on the column names. No idea why its doing this as i started coding from 3.0.1 and system file is as it should be with no changes. Here is the view that tries to set the session variable that triggers the error whenever the view loads: Code: <html> Here is the database file in config->database.php: Code: $active_group = 'default'; The ci_sessions table is found in the a_cfg database. And here is the sessions configuration in config.php Code: $config['encryption_key'] = '123'; Please I'm desperate for help. Please be detailed as i am a self-taught coder that is very simplistic. Thanks in advance, Geoff (09-18-2015, 06:11 AM)gloosemore Wrote: I've been pulling my hair out over this for days. I posted a similar post earlier but it wasn't laid out properly i think. I really need detailed information on how to proceed instead of hints on where the look please. Download CI3 again. Delete everything in your system directory. Place the contents of the CI3 system directory in your system directory. The libraries/Session.php file is from CI2 and should have been removed when you upgraded to CI3, but you either missed or misread that part of the upgrade instructions.
(09-18-2015, 07:15 AM)mwhitney Wrote:(09-18-2015, 06:11 AM)gloosemore Wrote: I've been pulling my hair out over this for days. I posted a similar post earlier but it wasn't laid out properly i think. I really need detailed information on how to proceed instead of hints on where the look please. Thank you for your quick reply. I did what you say and it has no effect. Here is the session part of the system directory as i just reinserted in from CI3: Code: system/ Isn't that the appropriate file structure? If not, how do i proceed? Thanks
Is there a Session.php file in the root of your /system/libraries/ directory? If there is, then you have missed the step of deleting the contents of the directory before copying over the files from CI3.
If there is not a Session.php file in the root of your /system/libraries/ directory, then your error message should have at least changed. If it did not, then make sure you don't have a Session.php file in your /application/libraries/ directory. Of course, this would imply that you were using some sort of customized Session library before and you may still have other issues to resolve in migrating to CI3.
(09-18-2015, 08:08 AM)mwhitney Wrote: Is there a Session.php file in the root of your /system/libraries/ directory? If there is, then you have missed the step of deleting the contents of the directory before copying over the files from CI3. **SOLVED** You were right. The problem was with my WAMP testing server. Though i was changing the files i uploaded to WAMP, if a directory or filename already existed on the WAMP testing server the previous file was never overwritten. By going into WAMP and deleting everything on the testing server then uploading again everything seems to be working fine now. I've also tested it outside of WAMP by putting the pages online and everything seems to be working. Thanks for your help.
Don't double post, be patient.
This topic is now just a duplicate of http://forum.codeigniter.com/thread-63015.html |
Welcome Guest, Not a member yet? Register Sign In |