Part of the EllisLab Network
   
2 of 2
2
CI 1.7 Session Bug within object storage
Posted: 22 August 2009 06:07 AM   [ Ignore ]   [ # 16 ]  
Grad Student
Rank
Total Posts:  61
Joined  02-14-2009

I agree with j2more.

Thanks hSATAC for his trick with !is_object.

To CI’s developper : what’s the point in using serialize() (line 691, library/session.php) if the only thing you can store in session is a string (because of str_replace, which works only on string) ?

Profile
 
 
Posted: 24 August 2009 06:52 AM   [ Ignore ]   [ # 17 ]  
Summer Student
Total Posts:  6
Joined  07-13-2009

Wow Thank you.

Worked wonders for me.

 Signature 

Always enough space for code. But not for that movie you always wanted.

Profile
 
 
Posted: 13 September 2009 12:12 PM   [ Ignore ]   [ # 18 ]  
Summer Student
Total Posts:  18
Joined  04-14-2007

Great fix. Thank you guys!

I can’t believe this is the second time I have to fix this. I did it the lazy way before (patching the core) and, of course, I erased it when upgrading to 1.7.2… Silly me!

Profile
 
 
Posted: 29 December 2009 07:03 AM   [ Ignore ]   [ # 19 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  268
Joined  07-31-2008

I also run into this issue which seems to be still there in 1.7.2 - please fix for 1.7.3.

 Signature 

RostElyn - Russian Language in Switzerland
TableEditor: No more tirying CRUD-code

Profile
 
 
Posted: 26 February 2010 12:22 AM   [ Ignore ]   [ # 20 ]  
Grad Student
Avatar
Rank
Total Posts:  32
Joined  08-22-2007

Thanks hSATAC and Brant, you made my day.

 Signature 

Onix - Top Shelf Web Development.

FireSale POS - Simple Web Based Point of Sale.

Profile
 
 
Posted: 11 June 2010 10:38 PM   [ Ignore ]   [ # 21 ]  
Summer Student
Total Posts:  6
Joined  06-05-2010
littleram - 10 May 2009 10:27 PM
lukeinjax - 16 February 2009 07:29 PM

I am experiencing this same issue. I’ve added the MY_Session file with the code above to my libraries folder, but I’m getting the following error:

A PHP Error was encountered

Severity
4096

Message
Object of class __PHP_Incomplete_Class could not be converted to string

Filename
libraries/MY_Session.php

Line Number
71 

Anyone else having this issue?


This happens if you initialise the session before you’ve loaded the class definitions for the object you’re trying to save into the session. Ensure that you’ve include()‘d or require()‘d all the class definitions before you load the session library.

Im facing this problem, do you mean to use:

include ‘libraries/the-class-i-want-to-store’;

inside my controller and before my controller class definition?

Profile
 
 
Posted: 16 November 2010 08:28 AM   [ Ignore ]   [ # 22 ]  
Summer Student
Total Posts:  2
Joined  11-16-2010

Yeah… you’re dewa brooo!!!!

Profile
 
 
Posted: 18 November 2010 04:20 AM   [ Ignore ]   [ # 23 ]  
Grad Student
Rank
Total Posts:  52
Joined  10-25-2010

Issue is fixed in trunk…

https://bitbucket.org/ellislab/codeigniter/issue/243/storing-object-in-session-data-not-working

Profile
 
 
   
2 of 2
2