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 24. Nov 2024, 09:23

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  [ 5 posts ] 
Author Message
 Post subject: $_SESSION's independant
PostPosted: 27. Mar 2010, 07:04 
Offline

Joined: 18. Mar 2008, 16:20
Posts: 45
Hi Michael !! Long time no see...

I'm back at using this wonderful gallery (still at 1.7.2, i'll update soon).

Im using it via "include". My webpage has a session with a 'name'.

When I include the gallery and I browse some photos and then go back to my webpage, I see some new keys on the session that have been inserted by TWG.


Is there a way as to maintain independent session_names between TWG and my webpage ?

I've tried session_destroy before including, session_write_close, starting a different session_name, unsetting all keys and rewriting the session (with this I made a little progress), but at the end I always end up with at least 10 strange keys on the SESSION that I prefer not to have.


Do you know any tricks to achieve this ? Is this possible ?

Thank you !


siran


Top
 Profile  
 
 Post subject: $_SESSION's independant
PostPosted: 27. Mar 2010, 19:52 
Offline

Joined: 18. Mar 2008, 16:20
Posts: 45
hi !

I figured out how to preserve my app's SESSION intact. This is what I did...

before including TWG:
Code:
   
if (empty($_SESSION['pregal'])){   
   $_SESSION['pregal'] = $_SESSION;
}


whenever my app is refreshed:
Code:
session_name("my_session_name");
session_start();

if (!empty($_SESSION['pregal'])){
   $_SESSION = $_SESSION['pregal'];
   unset($_SESSION['pregal']);
}



This should work fine both in my app and in the TWG!

Again, thanks for your great gallery !


regards,

siran


Top
 Profile  
 
 Post subject:
PostPosted: 27. Mar 2010, 21:58 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I'm starting right now to refactoring TFU so that all settings are in one array in the session. But this is planned for the next major release...

- Michael


Top
 Profile  
 
 Post subject: session_start
PostPosted: 27. Mar 2010, 22:37 
Offline

Joined: 18. Mar 2008, 16:20
Posts: 45
that would be indeed a good idea !

it would be nice if there exists a session during my_config.php load (or maybe not)

i had to put a @session_start in order to use session values...


My TWG installation has a particular set up, where base_dir's are dinamically configured with session values...

: )

but it seems to work alright now : )

thanks,

siran


Top
 Profile  
 
 Post subject:
PostPosted: 27. Mar 2010, 23:12 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
The session is started in 1.8 before the config is loaded.

I don't know when I changed this because I spited the session start and the session handling in one of the last versions...

- Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 31 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