Welcome Guest, Not a member yet? Register   Sign In
CI Sessions - No user data
#51

[eluser]toopay[/eluser]
@InsiteFX, yes i know you only give some example, to show how the "better way" to doing some authorization process, and of course it will be better to do it that way, instead what he is doing now (for god sake, he give a controller name "view". I wonder, if he give another controller name with something like "config", or "hook" lol). But i had struggle for last hour with him, to dig his problems with CI Session class (he mention he use version 1.7.1). I just want to see, is there any (simple) solution to solve his problems, based by his approaching of course (not mine).

@robjstanley. So far, its look like it really bugs for me. Are you have another version of CI on your pc, so you can do some comparing process?
#52

[eluser]InsiteFX[/eluser]
@toopay Agree, I have also tried helping. I think he should plan this all out and start from a new install.

And use meaningful names etc.

InsiteFX
#53

[eluser]DougW[/eluser]
I have just experienced a similar problem. I have several sites, all of which work. I have a 'Generic controller from which all other controllers are spawned, except for login. Login logs a user in and if I break and print the session, all my session variables are there. But after login in I redirect to the homepage which starts at the Generic controller. When I dump the session there, no userdata. It has dropped it. The sites are just different enough that it is difficult to compare them. What I am looking for is suggestions for what types of things can cause a session to get dropped. As I say, I have many other sites where this works on the same server with the same installation of CI. it is so weird to have one just drop the variables. I am using database and have double checked all the table names, field names, even the collation as there was some discussion on that a while back. Any ideas?
#54

[eluser]toopay[/eluser]
Quote:What I am looking for is suggestions for what types of things can cause a session to get dropped.
The session supposed to get dropped/deleted only : 1. if we do unset_userdata, 2. if user clear their cookies. The original issue was on CI 1.7.x and there are huge changelog entries list from that version to current stable version, including bug-fixes on Session class. Try upgrade your CI version, if this is the case.

If you already on current stable version, and this similar issue still occur, open new issue on GitHub with detailed information.
#55

[eluser]DougW[/eluser]
Thanks for the quick reply. I hesitate to enter an issue because it is working on several other sites with the same version. It is clearly something in my code. Just wondered what can cause it. Very strange...

#56

[eluser]DougW[/eluser]
SOLVED:

I was using two databases. I was using the same database user and password for both. This seems to confuse CI. As soon as I created a unique database user and password for the second database everything was ok.

I guess when the database.php is being parsed it holds on to the usernames? Odd bug.

Anyway, this resolved my issue.




Theme © iAndrew 2016 - Forum software by © MyBB