Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 23. Nov 2024, 16:21

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 27. Dec 2010, 13:34 
Offline

Joined: 13. Aug 2008, 06:34
Posts: 10
Location: Proserpine, Australia
I manage my php sessions in a mysql table, and I am having no success in getting TFU 2.12 to cooperate with my session. I am successfully recovering my session at the top of ftu_login.php, and so am able to point ftu at my upload directory. But your session workaround code gets invoked, the session_cache directory is created with a file containing your session variables, and my session is lost.
I have been running version 2.7.7 for a long time with php4, but am upgrading to php5 and latest versions of all subsystems.
Is there a problem in the database-driven session? Is there a session variable I should be storing in order for ftu to work in with my session?
I know my session is running okay because I'm writing my session data to your ftu.log file, but the very last 2 entries in the log, every time, belong to your temporary session creation.
Thanks for any light you can provide. Wayne.


Top
 Profile  
 
PostPosted: 27. Dec 2010, 14:18 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
if you do it like that you would have to join the sessions. tfu_login.php is only one of the files.
The session workaround is invoved because one of the mandatory session variables is not set.

If you only want to transfer the upload folder you can simply read the variable before I load my session.

- Michael


Top
 Profile  
 
PostPosted: 27. Dec 2010, 14:29 
Offline

Joined: 13. Aug 2008, 06:34
Posts: 10
Location: Proserpine, Australia
I understand. But it kills my session, because your session becomes the browser session. My site is then effectively logged out. Is there a way I can trigger it to join the sessions. In 2.7.7 you must not have carried your data via sessions, or I would have had the same trouble. One option is to revert to 2.7.7, because my security is sound. But that locks me to the past, which is what I'm trying to escape. So ... is there a way for me to trigger your code to use my session? Thanks for your help. I do appreciate it.


Top
 Profile  
 
PostPosted: 27. Dec 2010, 14:35 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
like I said - simply join the sessions.

how do you load your data? you either join your data with the one from TFU or save the one from TFU to a temp variable, load yours and then merge the data...

- Michael


Top
 Profile  
 
PostPosted: 27. Dec 2010, 14:47 
Offline

Joined: 13. Aug 2008, 06:34
Posts: 10
Location: Proserpine, Australia
I don't know how. I redefine the session functions, read my mysql table, and unserialize my session data. That gives me my $_SESSION array. That all happens fine. But then your code must do something else which I haven't tracked yet, then you add to the $_SESSION array (although I think it's been cleared by then). If there is something in $_SESSION that would mean you just added into the existing session, that might be all I need to know.

By the way, it looks like a bug in tfu_helper.php. The function tfu_checkSession() has no content, just {}, then a few lines of code follow that are not in any function, hence run when the file is included. Is that intentional?


Top
 Profile  
 
PostPosted: 27. Dec 2010, 15:09 
Offline

Joined: 13. Aug 2008, 06:34
Posts: 10
Location: Proserpine, Australia
I have just checked my session data in my table, and it has your both your data and mine. It is not logging me out. But it is not getting my upload directory setting either. I need to prevent the temp directory being written (it is not a location on the server I write to programmatically, and the session data is being saved in the database session). I am still looking, hoping to see a clue.


Top
 Profile  
 
PostPosted: 27. Dec 2010, 15:35 
Offline

Joined: 13. Aug 2008, 06:34
Posts: 10
Location: Proserpine, Australia
I'm sorry to keep bothering you, but I'm making progress. I am now finding my upload directory, and I am not being logged out. My session_id is being returned to the flash object.

But ...
1. Your temp session directory is being created, even though your session data is being propagated through my session.
2. If I go into the page without your session directory in existence, I get no files in the file list, but the session_cache directory is created. If I redraw the page, the correct files are then listed. According to the log I'm writing, the upload directory is correct every time.

I think I'm close.


Top
 Profile  
 
PostPosted: 27. Dec 2010, 16:09 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
delete the session_cache folder.

and check if

$_SESSION['TFU_RN']
and
$_SESSION['TFU_LOGIN']
are in your joined session.

The one function is not used anymore - I moved the code somewhere else.
Just have it there because of compability reasons for some plugins.

- Michael


Top
 Profile  
 
PostPosted: 27. Dec 2010, 16:20 
Offline

Joined: 13. Aug 2008, 06:34
Posts: 10
Location: Proserpine, Australia
TFU_LOGIN|s:4:"true";TFU_USER|s:9:"127.0.0.1";TFU_RN|s:31:"1291744656581528342093452929424";TFU_DIR|s:61:"../sites/uca/qld/congregation/proserpine.ucaweb.com.au/images";TFU_ROOT_DIR|s:61:"../sites/uca/qld/congregation/proserpine.ucaweb.com.au/images";

That it the part of my serialized session data that relates to tfu. I don't know what rn is, and I'm wondering if it's supposed to relate to the session id. According to the log, the session_id is sm675re0ibir3oodflpb3nlghstc43gp


Top
 Profile  
 
PostPosted: 27. Dec 2010, 16:24 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Then you manybe have the problem that you keep an old
$_SESSION['TFU_RN'] in the session.
This parameter is a token which is needed to make sure that the flash communikates with the server and not any other script. So you might have to clear the data from your db session before calling the flash.

- Michael


Top
 Profile  
 
PostPosted: 27. Dec 2010, 16:34 
Offline

Joined: 13. Aug 2008, 06:34
Posts: 10
Location: Proserpine, Australia
I have unset $_SESSION["TFU_RN"] after sendConfigData() at the bottom of tfu_login.php. I have checked my session data after displaying the page and TFU_RN is gone from the session data. I still don't have any files appearing in the list.

I confess I have commented out all of the code in tfu_helper.php which writes the cache directory and files. I haven't taken out anything that creates the $_SESSION elements.


Top
 Profile  
 
PostPosted: 27. Dec 2010, 16:42 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Just unset it in tfu_login.php right after you load your session so that it is set again.
If you change something in the code itself I cannot do a lot because if you modify the code you have to know what you are doing...

- Michael


Top
 Profile  
 
PostPosted: 27. Dec 2010, 16:54 
Offline

Joined: 13. Aug 2008, 06:34
Posts: 10
Location: Proserpine, Australia
Okay I've done that, but there is no change in the result. My session data has TFU_RN at the end of the array, but that is all that has changed.

I assure you, the only changes in code have been to eliminate the creating/writing/reading of the cache directory and its files, since they are being stored and recalled via my db. Just to prove it, I undid all changes in tfu_helper.php abd re-ran the tests. The results are the same - no files listed on the first attempt, but the cache directory and 1 htm file (0 bytes) are created, and on the second attempt I get my files listed, and the temp session file is created in the cache directory.

I'm going to have a look at the contents of that file in the cache directory to see if there are any variables missing in my session data.


Top
 Profile  
 
PostPosted: 27. Dec 2010, 16:58 
Offline

Joined: 13. Aug 2008, 06:34
Posts: 10
Location: Proserpine, Australia
... and they are identical. Is it possible that the flash object is trying to read the temp session variables from disk?

I will compare the data being returned to the flash object when it fails and when it succeeds to see if there is a difference.


Top
 Profile  
 
PostPosted: 27. Dec 2010, 17:01 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
are you loading your session data in tfu_file.php and tfu_upload.php as well?
Because if your server is one which does not handle session handling correctly then you have to do the handling.

This is the reason why it does exist. On some servers this is not needed at all - on other servers without nothing does work...
Check if the session variables do still exist in tfu_file.php and tfu_upload.php.

- Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 62 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy