Welcome Guest, Not a member yet? Register   Sign In
Session userdata unsetting if too many variables are set...? Help Please
#1

[eluser]bryantAXS[/eluser]
So I'm using Redux Auth on my site for user authentication, and I'm running into an issue when I'm setting data pulled from the DB as session data. After the session data is set in the Login controller, I can successfully echo out the session data; however, after I redirect to the authenticated page, the session data is clear and nothing is set. When I remove some of the properties, the session is pulled successfully on the later end of the redirect.

I know there is a 4K limit on the cookie size used for the sessions, but is this amount of data 4K? To be honest I'm not sure what 4K of plain-text looks like, but this seems pretty low.

This is the userdata array before the redirect, which does not remained set after the redirect.

Code:
array(
['session_id'] =>'53b0be1ec8af787d22713d98c8645984'
['ip_address'] =>0.0.0.0
['user_agent'] =>'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en'
['last_activity'] =>1279766546
['id'] =>9
['username'] =>'b'
['email'] =>'[email protected]'
['iconId'] =>8
['iconName'] =>'profileIcon_9.png')

Any thoughts or suggestions?

Thanks in advance!
#2

[eluser]InsiteFX[/eluser]
Use database sessions!

InsiteFX
#3

[eluser]bryantAXS[/eluser]
I actually was using DB sessions and I didn't realize it.

When I'm looking at the log file I'm getting an error in the Session library, that says its having problem unserializing the data. Do you see anything wrong with that array I'm using up top?

ERROR - 2010-07-22 08:44:58 --&gt; Severity: Notice --&gt; unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 97 of 100 bytes /Users/bryanthughes/Sites/steerio/system/libraries/Session.php 708
#4

[eluser]bryantAXS[/eluser]
Here is the serialized string its throwing a fit over:

a:5:{s:8:"iconName";s:17:"profileIcon_9.png";s:2:"id";s:1:"9";s:8:"username";s:1:"b";s:5:"email";s:7
#5

[eluser]bryantAXS[/eluser]
Well I'm an idiot and I figured it out... the field in my db that was storing this data was too short and not letting the entire string get set
:red:
#6

[eluser]InsiteFX[/eluser]
You can change the session user_data field to from text to longtext
if you need more space.

InsiteFX
#7

[eluser]Unknown[/eluser]
If you use MSSQL and a TEXT field for user_data don't forget to change PHP.INI settings.

default length in php.ini for a TEXT field is 4096 and not 8192 or more
#8

[eluser]qwang[/eluser]
[quote author="castor007" date="1283282075"]If you use MSSQL and a TEXT field for user_data don't forget to change PHP.INI settings.

default length in php.ini for a TEXT field is 4096 and not 8192 or more[/quote]

i found this property is closed default, but i found the information in the phpinfo() output
so where php get the default value?
thank you




Theme © iAndrew 2016 - Forum software by © MyBB