CI Sessions - No user data |
[eluser]robjstanley[/eluser]
That could take a while and isn't it irrelivent? as the same exact problem occurs now.
[eluser]toopay[/eluser]
take a look at http://ellislab.com/codeigniter/user-gui...sions.html : "Note: The Session class does not utilize native PHP sessions. It generates its own session data..bla..bla"... I want to help you debug your code, and i think we should fix it at CI spec, not php native session spec.
[eluser]InsiteFX[/eluser]
Here is your problem, you are autoloading the session library the session library automatically starts the sessions! So you do not need to use session_start(); By doing that you are creating a new session everytime. Code: function __construct() InsiteFX
[eluser]robjstanley[/eluser]
Code: <?php Code: <?php
[eluser]robjstanley[/eluser]
[quote author="InsiteFX" date="1301434996"]Here is your problem, you are autoloading the session library the session library automatically starts the sessions! So you do not need to use session_start(); By doing that you are creating a new session everytime. Code: function __construct() InsiteFX[/quote] I added session_start for the native php sessions. i wasn't autoloading the session library.
[eluser]toopay[/eluser]
Theres seems nothing wrong with that. What version of CI you use?
[eluser]toopay[/eluser]
are you say : "i wasn’t autoloading the session library."...lol, i ask you before this and you say you set session in autoload. Check your autoload.php in config folder, and check if you set something like Code: $autoload['libraries'] = array('session');
[eluser]robjstanley[/eluser]
I was autoloading it when i was using CI sessions, not when i was just using plain old PHP Sessions. |
Welcome Guest, Not a member yet? Register Sign In |