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, 08:01

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  [ 11 posts ] 
Author Message
 Post subject: private.txt not working
PostPosted: 2. Aug 2011, 00:07 
Offline

Joined: 2. Mar 2009, 13:36
Posts: 16
Hi!

I use a simple private.txt with password inside to protect some dirs inside my Gallery... After upgrading all my system, I can't make it work again... If I try to access protected gallery dir with correct password, TWG just asks me again for password... If I try to access with wrong password, I get a "wrong password, retype" message.

I've seen some errors in debug file... but they don't apear always when trying to access proctected gallery:

Code:
08.01.2011 14:22:32 (es) - ERROR 8 in P\Aspx\fotos\i_frames\i_privatelogin.php, line 80: Undefined variable: passwd
08.01.2011 14:22:32 (es) - ERROR 2 in P\Aspx\fotos\i_frames\i_privatelogin.php, line 80: in_array() [_a href='function.in-array'_function.in-array_/a_]: Wrong datatype for second argument


Do you have some idea what could I be doing wrong? Here are some config variables:

$password_file='private.txt'; I've tried some variations, just in case. No luck.
$user_login_mode = false; Just to show you I'm not using username system... Just plain text password inside private.txt.

Any idea?

Thanks a lot.


Top
 Profile  
 
PostPosted: 2. Aug 2011, 13:45 
Offline

Joined: 2. Mar 2009, 13:36
Posts: 16
More info: I either can't login with upper right link (same behaviour: TWG asks again and again for correct credentials)... I must go to /admin url directly, then introduce login/password...

Oh! I'm using last available version, 1.8.4... with almost no change in config from defaults...


Top
 Profile  
 
PostPosted: 3. Aug 2011, 00:03 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Make sure all files from TWG are transfered properly.

- Michael


Top
 Profile  
 
PostPosted: 3. Aug 2011, 09:36 
Offline

Joined: 2. Mar 2009, 13:36
Posts: 16
I'm using it in local PC with Apache 2.2 and last available php win32 binaries (5.0.x), so no possibility to have broken files because of fail ftp transfer... I'll reinstall and come back to you with results...

Thanks a lot.


Top
 Profile  
 
PostPosted: 3. Aug 2011, 12:07 
Offline

Joined: 2. Mar 2009, 13:36
Posts: 16
I've done a new installation from scratch in a different directory, with demo gallery (so not a comma changed from default config installation). All is working right... So I suspect it could be something relative to my gallery, which is quite big (29 pages, 343 dirs)... Could it be?


Top
 Profile  
 
PostPosted: 3. Aug 2011, 21:38 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
if you have so many dirs please read the howto how to optimize galleries.

Best,
Michael


Top
 Profile  
 
PostPosted: 4. Aug 2011, 13:51 
Offline

Joined: 2. Mar 2009, 13:36
Posts: 16
Ok... I understand you are talking about howto 45... Anyway... Doing those things should affect speed... but not the login session stability... ¿?

I've done some more tests, and I can confirm that my whole gallery is crashing TWG... If I configure different basedir, with less galleries, there's no login session problem at all. :(


Top
 Profile  
 
PostPosted: 4. Aug 2011, 14:23 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
maybe the session size is getting a problem then. TWG does cache folder structures in the session to make everything much faster.

have you tried:
$cache_dirs = false;
$autoenable_cache=-1; // because otherwise the cache is turn on automatically later on.

What you can also do is
$use_cache_with_dir = true;

then the cache folder is not flat but with folders. Some servers have problems with big file lists...
You only have to test if this works because php has to be able to create dirs.

- Michael


Top
 Profile  
 
PostPosted: 4. Aug 2011, 17:11 
Offline

Joined: 2. Mar 2009, 13:36
Posts: 16
I did all of your recomendations... None of them worked... But as you said it has to be something related to session caching... I just disable "Enable session caching of directories and files" using admin panel... Now all is working flawlessly again.

What's exactly what I "lose" by disabling this, provided that general caching is enable?

Thanks man!


Top
 Profile  
 
PostPosted: 4. Aug 2011, 19:30 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Enable session caching of directories and files == $cache_dirs = false;

If this is enabled directories are only read once and not every time you access the folder.
Especially for the counting how many files are in a folder does already a prefetch. So normally TWG takes a little bit more
at the beginning and after that everything is taken from cache.

But with that many folders this might runs into a limit.

Have you find out at how many folders this happens? Because I tried with 200.000 files but this is my local install where I don't have any memory problems...

- Michael


Top
 Profile  
 
PostPosted: 4. Aug 2011, 19:41 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
you can also try to enable the caching but set
$serialize_dir_data=false;
$precache_background=false;

then only the folder s you access are cached and no precaching in the background is done...

- Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 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