Welcome Guest, Not a member yet? Register   Sign In
SESSION: ci_sessions database table not populating
#3

(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.

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

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET `last_activity` = 1442580701, `user_data` = 'a:2:{s:9:\"user_data\";s:0:\"\"' at line 1

UPDATE SET `last_activity` = 1442580701, `user_data` = 'a:2:{s:9:\"user_data\";s:0:\"\";s:7:\"user_id\";i:1;}' WHERE `session_id` = 'd8ca004aaa0c4db687a91ae78d996afd'

Filename: libraries/Session.php

Line Number: 289

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.

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.

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/
   core/
   database/
   fonts/
   helpers/
   language/
   libraries/
      Cache/
      Javascript/
      Session/
          drivers/
               index.html
               Session_database_driver.php
               Session_files_driver.php
               Session_memcached_driver.php
               Session_redis_driver.php
          index.html
          Session.php
          Session_driver.php
          SessionHandlerInterface.php


Isn't that the appropriate file structure?

If not, how do i proceed?

Thanks
  


Messages In This Thread
RE: SESSION: ci_sessions database table not populating - by gloosemore - 09-18-2015, 08:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB