Announcement

  •  » Engine
  •  » "local" directory versus "_data" directory

#1 2011-12-29 10:58:19

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13174

"local" directory versus "_data" directory

Currently (Piwigo 2.3), we have _data that do not have to be reachable through HTTP. With [Bugtracker, ticket 2542, fixed] replace $conf['local_data_dir'] with $conf['data_location'], _data (or $conf['data_location']) must be relative to the Piwigo directory and be reachable through HTTP (because combined CSS/JS files and multisizes are stored inside).

rvelices can you tell us more about this change? Why does Piwigo need it?

related to [Forum, topic 16745] turn the "local" directory into a configuration setting


Latest blog post (May 3rd 2018) New subscription form

Offline

 

#2 2011-12-29 11:09:36

rvelices
Piwigo Team
2005-12-29
1960

Re: "local" directory versus "_data" directory

It is not really a "must" requirement, but I thought it would be better to differentiate between

- data that is purely maintained by piwigo
  - might require special directory/files permissions
  - does not need to be backed-up

- data that is maintained by the user
  - local config, language, css

With the new mode you can say it is safe to backup
database
galleries
uploads
local

and you wont have a local directory 1 GB of combined css/js/derivatives

Note: For my use I upgrade often manually piwigo installation and the data directory is one level outside the piwigo installation which makes things easier to upgrade

Offline

 

#3 2011-12-29 11:22:07

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13174

Re: "local" directory versus "_data" directory

I fully agree that it is much cleaner to separate local/config and local/i or local/combined. The argument needs to be backed up: yes/no is important.

Note: For my use I upgrade often manually piwigo installation and the data directory is one level outside the piwigo installation which makes things easier to upgrade

can you describe how you will configure your Piwigo with this environment and the new Piwigo settings?


Latest blog post (May 3rd 2018) New subscription form

Offline

 

#4 2011-12-29 11:30:28

rvelices
Piwigo Team
2005-12-29
1960

Re: "local" directory versus "_data" directory

plg wrote:

can you describe how you will configure your Piwigo with this environment and the new Piwigo settings?

data_location = '../pwgdata/'; //everything outside install dir
#sites.galleries_url = '../pics'; //original photos outside install dir

then my upgrade process will be

Code:

unzip -n pwg??.zip -d x ; mv x/pwg?? pwg.new ; rmdir x
cp pwg/local/config/database.inc.php pwg.new/local/config/
\rm -rf pwg.old; mv pwg pwg.old ; mv pwg.new pwg

Done

Offline

 

#5 2011-12-29 11:56:22

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13174

Re: "local" directory versus "_data" directory

rvelices wrote:

plg wrote:

can you describe how you will configure your Piwigo with this environment and the new Piwigo settings?

data_location = '../pwgdata/'; //everything outside install dir

So it can't work if Piwigo is installed at the root of your website, do you confirm?


Latest blog post (May 3rd 2018) New subscription form

Offline

 

#6 2011-12-29 12:03:49

rvelices
Piwigo Team
2005-12-29
1960

Re: "local" directory versus "_data" directory

plg wrote:

So it can't work if Piwigo is installed at the root of your website, do you confirm?

I confirm unless the data directory is a symbolic link to a real directory outside the install.

Offline

 

#7 2011-12-29 12:13:30

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13174

Re: "local" directory versus "_data" directory

rvelices wrote:

plg wrote:

So it can't work if Piwigo is installed at the root of your website, do you confirm?

I confirm unless the data directory is a symbolic link to a real directory outside the install.

Of course, but symlinks are an advanced technique, trust me ;-)

Anyway, that is not a real problem.


Latest blog post (May 3rd 2018) New subscription form

Offline

 

#8 2012-05-14 15:41:26

deserteagle369
Guest

Re: "local" directory versus "_data" directory

Put the data and pic directory outside the install directory is a very useful and reasonable feature.

1.
like rvelices said, it's easy to upgrade

2.
make system backup size easy, my pic directory over 50G.

3.
can view the websize pics by other image view software when the piwigo are not reachable.
In my case, I use piwigo built a family gallery, so every pc in my home can easy access piwigo gallery by web, but sometimes I go out with notebook, I prefer only keep a copy of gallery directory without pwg_high directory, then I can use image view software like faststone to play slideshow of whole gallery directory in websize (800x600) with background musics.

If the pwg_high and thumbnail directory can seperate out of gallery directory that will make batch management easy. for example I use faststone to generate the whole gallery directory from my original photo directory at one time(maybe several hours), then I use synchronize and thumbnail function in piwigo to generate thumbnail at one time too(this also can be done by faststone if the thumbnail directory are out of install directory.

The multiple size function can generate different size pics, that's great if the pics in gallery are contribute by different users, but if the pics are mostly upload by admin like me, I prefer batch generate the websize and thumbnail before upload it.

 

#9 2012-05-14 15:46:37

flop25
Piwigo Team
2006-07-06
6839

Re: "local" directory versus "_data" directory

Hello deserteagle369,
I suggest you to download and test the 2.4 : there is no more thumbnail and pwg_high folders
you will still be able to generate apriori the multiple size but it's much more complicated than before


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#10 2012-06-21 16:08:20

deserteagle
Translation Team
2012-01-13
18

Re: "local" directory versus "_data" directory

I tried 2.4RC3, the view experience is not good because I have to wait the thumbnail to be generated, when I change the picture size by click the multiple size button on the top left of page, I also have to wait seconds for the generate process.

I strong believe "generate on the fly" sound cool but not practicable, especially for huge number of photos.

Create the thumbnail and web size in advance will not use too many disk quote (for my case, 50G photos with web size(800x600) use about 300M), but make the page load and show photos to visitor quickly!

I strong suggest that make the thumbnail/ HD folders be able to customize are more useful compare to "generate on the fly".

deserteagle369


life is a journey.
Eagle

Offline

 

#11 2012-06-21 16:14:13

flop25
Piwigo Team
2006-07-06
6839

Re: "local" directory versus "_data" directory

well you just need to 'wait' only once. One single visitor can generate all your gallery, the others will never 'wait'.

You can generate locally, and upload if you really really want it


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#12 2012-06-21 16:24:19

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13174

Re: "local" directory versus "_data" directory

If you add photos with the web form or with a remote tool (like iPhoto or Lightroom), the thumbnail is automatically generated at upload time, to avoid this slow loading "first time". Read more on [Forum, topic 18755] [multisize] AJAX load for thumbnails


Latest blog post (May 3rd 2018) New subscription form

Offline

 

#13 2012-06-22 09:38:49

deserteagle
Translation Team
2012-01-13
18

Re: "local" directory versus "_data" directory

Most time I use FTP to upload photos.

I look at the \_data\i folder(cache), I'm worry that to put different size photos in one folder maybe not a good idea.

I had 2 weeks vacation in NZ with my family, so there are more than 2000 photos in one album, so there will be near 20k photos (9 multiple size) in the cache folder.


life is a journey.
Eagle

Offline

 

#14 2012-06-22 09:40:33

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13174

Re: "local" directory versus "_data" directory

deserteagle wrote:

I had 2 weeks vacation in NZ with my family, so there are more than 2000 photos in one album, so there will be near 20k photos (9 multiple size) in the cache folder.

I do agree with that. I have some users (on Piwigo.com) who add sometimes 4000 photos on the same day. That may mean 36000 files in the same folder. Not good for filesystem performances.


Latest blog post (May 3rd 2018) New subscription form

Offline

 

#15 2012-06-27 16:13:01

deserteagle
Translation Team
2012-01-13
18

Re: "local" directory versus "_data" directory

flop25 wrote:

well you just need to 'wait' only once. One single visitor can generate all your gallery, the others will never 'wait'.

You can generate locally, and upload if you really really want it

I generated the thumbnail and upload it to the cache folder, but it look like piwigo do not use the thumbnail I generate, it took some times to generate the thumbnail again.

I compare the difference, the thumbnail I generated with faststone had big size (about 22.5KB) using bDCT-h compression, the other one generated by piwigo had small size (5.1KB) using pDCT compression.

flop25

Can you share with me how to generate thumbnail (and also other size) and upload, I really don't want visitor to wait long time.

thanks.

Last edited by deserteagle (2012-06-27 16:26:25)


life is a journey.
Eagle

Offline

 
  •  » Engine
  •  » "local" directory versus "_data" directory

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2018 · Contact