View Single Post
Old February 3rd, 2008, 01:59 AM   #14 (permalink)
Luciano
Moderator
Verified Customer
 
Join Date: Aug 2005
Posts: 1,231
Well i tested on my install.. and yes it happens but only if your gallery is in safemode..
that means that ALL files are only in 1 directory gallery/files/filename.jpg

You should not use that unless your server is really in safemode.. and you cannot change that... (ie. php cannot create subdirectories by itself..)

Why? most obvious reason: the file limits..
some systems start crashing when there are 20000 files in one directory.. others allready with 15.000 but..
each image needs at least 3 files.. so that will limit you to 6000 or 7000 images in total before your server crashes..

if you can use the normal option: you can have 100 thousand images without a problem.. as directories and subdirectories will be created for each DIGIT of the user id.. (only limit left will be 6 to 7000 images PER USER) wich is much nicer..

but there are other reasons like performance etc.. (takes less time to seek a file with 50 files in a dir than a file when there are 5000 files in a dir) ...

ATTENTION: the settings are a bit confusing in wording...
if you have:
Quote:
Click the 'Change File Storage Method' button below to turn the safemode bypass Off.
it means that your gallery is using safemode...!!!! (what it shouldnt)

==================================

But back to the topic.. the fix above seems to work.. but i dont like it..

because when you switch from safemode back to normal you will loose images.. (the system looks for images like userid-filename to put them back in the subdirectories) now when i switched to safemode all my files were called like that (1-filename.jpg) the new uploads would be: 1_filename.jpg .. when i want to switch back.. the system will NOT be able to tell what are my files..
===> i will loose the new uploads..


so what I suggest as quickfix: (but i think zach is looking into it in a more deep manner and will come up with a real fix very soon)

leave the line in the post above like it is..(i.e. dont change it)
instead change:
in forum/includes/functions_gallery_imageedit.php
Code:
Content visible to verified customers only.
to
Code:
Content visible to verified customers only.
(or simply add the dash after ^a-z0-9_-)
it seems to work... but.. i think it should be tested more deeply..
could be other drawbacks (none that i can think of.. but you never know)

Luc

Last edited by Luciano; February 3rd, 2008 at 02:15 AM.
Luciano is offline