Welcome Guest, Not a member yet? Register   Sign In
Uploadify and CI 2.0
#1

[eluser]Unknown[/eluser]
Hi

Im building this application where a user is able to upload his own pictures after he is logged in, im using Uploadify to handle the uploading and everything works fine in Mozilla Firefox and Google Chrome etc. but when it comes to IE8/7 it still uploads, but kills the session and logs out the user right after the upload is complete.
When i log back in the picture is updated and uploaded, but i want to avoid getting my session killed during the upload.

I've tried searching around for days for a solution or workaround but nothing works.
I set my session to be saved in the database and i tried putting the session in a cookie and restoring it again, but no luck (unless i did it wrong).

Any help is appreciated on how to avoid this problem...

Thanks
#2

[eluser]CroNiX[/eluser]
The problem is that uploadify is a flash app, which does not pass along the php session info and also has a different user agent string than the browser. If your session happens to change (which it does periodically using CI's sessions) on a request, you will get logged out because the session is gone because they no longer match. There are other workarounds on the forums if you search.
#3

[eluser]Cristian Gilè[/eluser]
http://ellislab.com/forums/viewthread/150550/


Cristian Gilè
#4

[eluser]Unknown[/eluser]
Found a solution that works,

In your config.php you can set your

Code:
$config['sess_match_useragent']= FALSE;

when doing this CI 2.0 atleast, won't create a new session for the flash object, and thus not kill your current session in IE.
#5

[eluser]beatryder[/eluser]
[quote author="Wakeydk" date="1299073425"]Found a solution that works,

In your config.php you can set your

Code:
$config['sess_match_useragent']= FALSE;

when doing this CI 2.0 atleast, won't create a new session for the flash object, and thus not kill your current session in IE.[/quote]

I think this only works in IE. Testing in FF and Chrome it doesn't work that way. In Chrome the flash plugin is completely separate from the rest of the page.




Theme © iAndrew 2016 - Forum software by © MyBB