Part of the EllisLab Network
   
 
Problems with DB Session
Posted: 02 September 2007 01:07 PM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  47
Joined  09-01-2007

Hi!

I’m trying out the Auth library, which utilizes DB Session.
When submitting the login form I get the error below.

Has any of you experienced this? How do I fix it? smile

Thanks in advance!


A PHP Error was encountered
Severity: Notice
Message: Undefined index: user_agent
Filename: libraries/Db_session.php
Line Number: 297

A PHP Error was encountered
Severity: Notice
Message: Undefined index: ip_address
Filename: libraries/Db_session.php
Line Number: 298

A PHP Error was encountered
Severity: Notice
Message: Undefined index: session_id
Filename: libraries/Db_session.php
Line Number: 304

An Error Was Encountered
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 = NULL, user_agent = NULL, ip_address = NULL, session_data = ‘’ at line 1

UPDATE SET last_activity = NULL, user_agent = NULL, ip_address = NULL, session_data = ‘a:1:{s:23:\“flash:new:sentry_status\”;b:0;}’ WHERE session_id

Profile
 
 
Posted: 02 September 2007 05:13 PM   [ Ignore ]   [ # 1 ]  
Research Assistant
RankRankRank
Total Posts:  558
Joined  06-17-2006

Sound like you are configured to use database to store session values but your database table may not be created.
Revisit your session library manual pages on how to create the session table.

EDIT: Forget I said that. Fingers fater than brain! Sorry

 Signature 

CodeCrafter - Open Source Code Generation for CI

Profile
 
 
Posted: 02 September 2007 06:34 PM   [ Ignore ]   [ # 2 ]  
Research Assistant
RankRankRank
Total Posts:  917
Joined  07-10-2006

Auth has not been maintained for some time. There is a post somewhere on the forum that includes a link to the history of auth (auth, userauth, miniapp) and its different PHP4 and PHP5 implmentations that was written by peccavio.

FreakAuth is the most up-to-date ancestor of auth. The package includes a lot of sample code to get you started so don’t let the number of files intimidate you. You only need a few of those files (userlib and its config file) to build your own implementation for your application.

EDIT: I recall seeing a recent post about auth written by a user that identifies some fixes for getting the original auth library to work under the 1.5.x series.

Profile
 
 
Posted: 16 October 2008 10:57 AM   [ Ignore ]   [ # 3 ]  
Summer Student
Avatar
Total Posts:  21
Joined  07-12-2007

I have had this problem when I started application, but I solved this changing FALSE to TRUE in the line
$config[‘sess_use_database’]  = TRUE;
of config.php.

 Signature 


Liberto López
Design & web projects manager

······························
REACTION MEDIA · web & design
www.reactionmedia.es
······························

Profile
 
 
Posted: 21 August 2009 07:54 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Total Posts:  1
Joined  06-11-2009
libnac - 16 October 2008 10:57 AM

I have had this problem when I started application, but I solved this changing FALSE to TRUE in the line
$config[‘sess_use_database’]  = TRUE;
of config.php.

this solved my problem - thanks

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120471 Total Logged-in Users: 31
Total Topics: 126548 Total Anonymous Users: 3
Total Replies: 665393 Total Guests: 287
Total Posts: 791941    
Members ( View Memberlist )