db_session and set_flashdata problem |
[eluser]Unknown[/eluser]
Hello, I'm having problems displaying session flashes. This is what I have: Code: function index() I'm using FreakAuth for authentication and when I use above code, it clears the sessions and logs me out by displaying the login page. Any ideas?
[eluser]cwpollock[/eluser]
I to am having this issue. I'm eager to hear a response.
[eluser]Derek Allard[/eluser]
What is the issue all? Could you explain it outside the scope of freakauth?
[eluser]pioSko[/eluser]
Ok, I'm having the same problem... and i may have an idea as to why it's happening. However, my n00b knowledge on sessions and ci in general means I may be wrong I've got a db_sessions and Lang Selection setup (http://codeigniter.com/wiki/Language_Selection/) First a question: Should db_session be creating a new session_id everytime i open a page... ANY page.. on my site?? I've checked my database table and it just keeps creating new entries everytime I change a menu item (for example) Anyways, with that in mind, changing the language invokes a function which writes to the db and then redirects using flashdata (uri stored in flash) ... but it does not redirect to the previous page because a NEW sescsion is being created and therefore the previous flashdata is now in a useless previous database entry not being used. does what i've written make sense??
[eluser]adamp1[/eluser]
I found I had this problem a while ago. It was with FreakAuth I had the issue with. In the end I couldn't find a solution. For what ever reason FreakAuth didn't like me touching its sessions. Its not a problem with CI since the session library in FreakAuth is not the offical CI one. I don't use FreakAuth (use my own) and I use the offical CI sessions library and it works fine. Personally I think its a problem with FA but couldn't be bothered to find a fix.
[eluser]cwpollock[/eluser]
I'm glad some conversation is generating here, I'll try to be more detailed in the problem I'm having and what I've noticed. Environment: I'm running PHP 5, mySql 5, Apache 2 on Windows using WAMP CodeIgniter 1.6.1 using the Auth plugin Presenting Problem: After a I login the authentication does not stay in the session. I have intersted "break;" statements at various points in the code and can see that authentication IS successful, but that it doesn't store it then in Session. Debugging: What I see is that this value appears in the session table immediately after I login: a:1:{s:23:"flash:oldentry_status";b:0;} If I navigate to another page the session appears as: a:0:{} Essentially it looks like (as the first user described) that somehow the values in session_data field are being overwritten instead of concatenated together. Hope this helps someone point out the problem. I haven't changed either module. If someone can recommend a better authroization module I'd would even tolerate trying another. Thanks!
[eluser]adamp1[/eluser]
I would love to say try mine, but haven't finished it yet. Personally I think it will knock the pants off most others since it has Access Control Lists. Iv been putting a lot of work into making how you manage them as easy as possible. Just need to polish off a few bits, before release.
[eluser]pioSko[/eluser]
I'd love to get my hands on an easy to install and implement authorization kit. The ones I've tried from the wiki are a pain inthe @rse. Freak didn't even work for me and I ha no clue as to why since it's install doc was so vague.
[eluser]cwpollock[/eluser]
Ok.. here's some more data. I stuck some debugging into my code Here's what I put in: Code: function sess_update() Here's what I got Code: Array ( [last_activity] => 1204775796 [user_agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv [ip_address] => 127.0.0.1 [session_data] => a:1:{s:7:"user_id";s:1:"3";} ) This is calling the simple "login()" option from the Auth module. Notice the last entry. That's what's killing my login. I've tried to trace where that would be coming from in the code, but I can't find where that is happening. |
Welcome Guest, Not a member yet? Register Sign In |