https://www.icyphoenix.com/viewtopic.php?f=26&t=3374&p=24060#p24060
-----------------------------------
moreteavicar
Sat 09 Feb, 2008 20:09

Re: How To Implement Jupload Applet V0.90
-----------------------------------
Well... I'm one step closer to solving the problem...

It appears that for some reason Firefox triggers a different session ID. Because the page reloads, the file_list variable is heavily dependent on storing to a global session variable (this is supposed to be handled server-side). We observe session changes by inserting appropriate echo lines in the routine, e.g. echo session_id();

In Internet explorer, we can see session id and file_list array contents during the upload action url part. 

IE upload action Image:

[img]http://www.icyphoenix.com/files/images/170/ie_session4a.jpg[/img] 

During the  process loop (which is in same file as action loop) - after page reload, the session ID is the same, and session array contents are retrieved back to file_list array.

IE Process loop image: 

[img]http://www.icyphoenix.com/files/images/170/ie_session4b.jpg[/img] 

In Firefox, note the session ID in action/upload mode:

Firefox upload action Image:

[img]http://www.icyphoenix.com/files/images/170/ff_session4a.jpg[/img] 

during process mode, the session ID is different, so the session file_list variable is lost:

Firefox Process loop image: 

[img]http://www.icyphoenix.com/files/images/170/ff_session4b.jpg[/img] 

Why this occurs with firefox I do not yet know - [strike]possibly hosts do not allow php sessions to be stored on the server in the php default session directory (which most people say is var/), but that it is browser specific is a mystery. [/strike]

Also, with simple session test scripts, the session variable appears to store ok with firefox... 
...so I don't know if the firefox registers the change in php parameter (mode=process) in the URL of the album_jupload script as a new page, and therefore requests a new session / session_id...

If this is the case... and there is no obvious work around... then will need to rethink how the file_list variables are stored - [strike]most likely to SQL...[/strike] *Edit SQL would slow it down a bit - much better/quicker to write directly to a file, which is precisely what server side session variable handling does*


