Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Session data gone after redirect (CI 2)
#11

[eluser]Kobus M[/eluser]
[quote author="toopay" date="1297024653"]just curious with your unbelievable case, can you uploaded your full packed CI which you use now, and post some url to download here...

By the way, i think session stuff is just a little part of any application development, and its just some easy part.[/quote]

I have never had it so touch with sessions, I agree - usually a lot easier.

Well - I have done almost nothing yet, as I said, trying to get the login and sessions to work.

http://www.internetmax.co.za/ci.zip
http://www.internetmax.co.za/ci.sql

That's all I have for now :-(

Kobus
#12

[eluser]toopay[/eluser]
Yes, there is something wrong with that. Just fast fixed,
1. Remove Session.php at your ./application/libraries/
2. Replace Session.php at your ./system/libraries/ with this : http://bit.ly/ieKV9Y
3. Now, it should work.
Save your old file, then compare it with above files, then you will know, what section are need to be fixed.
#13

[eluser]Kobus M[/eluser]
[quote author="toopay" date="1297034818"]Yes, there is something wrong with that. Just fast fixed,
1. Remove Session.php at your ./application/libraries/
2. Replace Session.php at your ./system/libraries/ with this : http://bit.ly/ieKV9Y
3. Now, it should work.
Save your old file, then compare it with above files, then you will know, what section are need to be fixed.[/quote]

Toopay, you are BRILLIANT. Thanks - it works.

The session library I had there in the application folder was one of the attempts I found on the web to try and solve this, as the built-in session library didn't work.

Have a great evening!

Kobus
#14

[eluser]bimbolera[/eluser]
hi guys, im actually experiencing a problem related to this. i checked my application/libraries/ folder but i cant find any session.php file. i hope you could help me solve my problem. thanks. Smile
#15

[eluser]Kobus M[/eluser]
[quote author="bimbolera" date="1298042079"]hi guys, im actually experiencing a problem related to this. i checked my application/libraries/ folder but i cant find any session.php file. i hope you could help me solve my problem. thanks. Smile[/quote]

The file is located in system/libraries if you are using the default sessions file. Mine was in libraries, because I have used a custom sessions.php file.

Hope this helps!

K.
#16

[eluser]bimbolera[/eluser]
[quote author="toopay" date="1297034818"]Yes, there is something wrong with that. Just fast fixed,
1. Remove Session.php at your ./application/libraries/
2. Replace Session.php at your ./system/libraries/ with this : http://bit.ly/ieKV9Y
3. Now, it should work.
Save your old file, then compare it with above files, then you will know, what section are need to be fixed.[/quote]

please refer to number 2. i did this step by step, but i didnt find session.php in this location ./application/libraries/ i just hopped into step 3 and 4. when i did, my session actually is not working. no session is being created. thanks for the reply Smile

btw, im using CI 2
#17

[eluser]Kobus M[/eluser]
[quote author="bimbolera" date="1298064962"][quote author="toopay" date="1297034818"]Yes, there is something wrong with that. Just fast fixed,
1. Remove Session.php at your ./application/libraries/
2. Replace Session.php at your ./system/libraries/ with this : http://bit.ly/ieKV9Y
3. Now, it should work.
Save your old file, then compare it with above files, then you will know, what section are need to be fixed.[/quote]

please refer to number 2. i did this step by step, but i didnt find session.php in this location ./application/libraries/ i just hopped into step 3 and 4. when i did, my session actually is not working. no session is being created. thanks for the reply Smile

btw, im using CI 2[/quote]

Yes, I only had session.php in my "application/libraries/" folder because I used a custom session.php file. YOUR session.php file will be in "system/libraries/" folder. So it is okay to leave step 1 out.

Also look at the other topics in this post by toopay. There are also session variables to set in the configuration files, and some other ideas you may want to try. If that don't work, sorry, I can't help :-(
#18

[eluser]toopay[/eluser]
@bimbolera, at Kobus case,
Quote:The file is located in system/libraries if you are using the default sessions file. Mine was in libraries, because I have used a custom sessions.php file.
so, my solution may not work for anyone else except for him, at this case.

By deafult, there is no 'Session.php' at you ./application/libraries/. Kubus, as he said, had his own custom session. So, obviously, you can't find any file at that folder.

you can, either starting new thread for your problems, or start explain it here.
#19

[eluser]enigmas[/eluser]
Unfortunately, this still does not work for me, even after I replaced session.php...

When I try to access session data in the code, CI2 writes new item in session table.

So, after 1 post back, there are appear 3 new rows in session table...

Does anybody found workaround for this?
#20

[eluser]enigmas[/eluser]
I have found how to solve this problem, hope it will be also useful for other users.

I've tested my site on a localhost, but $config['cookie_domain'] was set to another domain name, and die to this the browsers did not accept CI session cookies..

$config['cookie_domain'] should be same as your domain name.




Theme © iAndrew 2016 - Forum software by © MyBB