FreakAuth - keep session alive in flash-call (fancyupload) |
[eluser]Skinnpenal[/eluser]
Hi guys! I'm trying to implement Fancyupload - a script for uploading files via flash, and by that getting progress bars on the transfers. In my application I use FreakAuth for authentication. How can I get the flash script accepted by FreakAuth? I've been trying to supply the session ID via the url: controller/action?PHPSESSID=..... And getting the session_id like this: Code: $this->input->cookie($this->db_session->sess_cookie); I suspect that last line of being wrong, and in that case.. how can I retrieve the session id from FreakAuth? EDIT: When I print the contents of $_GET, it's empty. Might that be reason for this failing? In that case, how can I fix the issue then? ![]()
[eluser]hybriid[/eluser]
$_GET is disabled in CI, try using url: controller/action/session_id and then access it with $this->uri->segement(3) or function action($session_id){ ... }
[eluser]Skinnpenal[/eluser]
ah.. good point, thanks! ![]() Any ideas how I can get FreakAuth to use this session id?
[eluser]hybriid[/eluser]
sorry, can't help you there, i haven't used freakauth.
[eluser]Wimm_vw[/eluser]
I try to do the same thing. Has anyone found a solution to this matter? I am getting my login form underneath when I try to upload the files....
[eluser]runrun[/eluser]
@skinpennal can you post your PHP code in your fancyupload ? I dont know how to get it work.
[eluser]alant[/eluser]
This isn't a FreakAuth problem.. it's just that Flash objects basically behave like separate browsers and so they lose the session that you want them to use. FancyUpload provides a way of posting the ci_session.. The following will make FancyUpload play nicely with any sort of session-based stuff that you're doing with CI. -- When you initialise Fancyupload, make sure that appendCookieData is set to true. Code: appendCookieData: true Make sure that in your ci_session config, that you are NOT matching useragents: Code: $config['sess_match_useragent'] = FALSE; // Because Flash is being used And then you need to change the sess_read function in the Session library. You should really do this by creating your own MY_Session library... add the following lines below the session cookie check: Code: // Has the session id been posted? So the beginning of the sess_read function will look like this: Code: function sess_read() Not sure if this is the best way to do it.. but it works for me! |
Welcome Guest, Not a member yet? Register Sign In |