lock down gallery

dkerlee
dkerlee's picture

Joined: 2005-06-09
Posts: 50
Posted: Wed, 2010-04-21 03:53

Hello folks,
I want to lock up my gallery with a site wide general purpose password. There is a terrific module for doing just that:
login as administrator, go to the album(s) in question, edit album, general tab, go to the bottom Password Protection and simply assign a password.

I did this, and it looked like it did it recursively, but now I'm finding that when I google my name, and old links come up to random galleries, one can still link directly to that page and see all the pictures - no password no nothing.

Did I do something incorrect? I'd like to make sure the gallery and all nested galleries get the password treatment.

Thanks so much!
drew


Gallery version (not just "2"): 2.3 core 1.3.0
PHP version (e.g. 5.1.6): 5.1.1
PHPInfo Link (see FAQ): http://kerlee.com/phpinfo.php
Webserver (e.g. Apache 1.3.33): apache 2.0.53
Database (e.g. MySql 5.0.32): mysql 4.1.10a, lock.system=flock
Activated toolkits (e.g. NetPbm, GD): ArchiveUpload, Exif, Thumbnail, ImageMagick, Getid3, jpegtran, LinkItemToolkit, SquareThumb
Operating system (e.g. Linux): linux
Browser (e.g. Firefox 2.0): chrome 5.0.342.9

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2010-04-21 04:13

If you've entered the password and then you find those links and click on them, you won't be prompted for a password again.

Test it by clearing your cookies and internet files, then click on one of those links and see what you get.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
dkerlee
dkerlee's picture

Joined: 2005-06-09
Posts: 50
Posted: Wed, 2010-04-21 16:11

I tested it:
this link to the root/drew prompts for a password:
http://kerlee.com/gallery/main.php?g2_itemId=21334

but googling "drew kerlee gallery"
http://www.google.com/search?hl=en&client=firefox-a&hs=b5c&rls=org.mozilla%3Aen-US%3Aofficial&q=drew+kerlee+gallery&btnG=Search&aq=f&aqi=&aql=&oq=&gs_rfai=
get's this link:
http://kerlee.com/gallery/main.php?g2_itemId=29322
where I can freely look at pictures. It is definitely inside the root/drew folder in the gallery - and not password protected.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2010-04-21 16:49

Yep, it's not password protected. So it appears the change didn't get applied to all sub-albums. If you have lots of items, the process might have failed as well while applying to sub-items/albums because that's pretty intensive. You may need to hit each sub-album.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
dkerlee
dkerlee's picture

Joined: 2005-06-09
Posts: 50
Posted: Wed, 2010-04-21 17:31

I noticed that the web browser did seem to freeze up apart way through the operation. What can I do to fix this? Do I need to increase the php memory limit? or time out time, or something like that?

Do you know of a way to apply this directly via a mysql query? That might be much faster, and yield the same results.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2010-04-21 19:28

more memory? You can try

Time out? You can try

MySQL query, maybe, but I have no clue what or how.

I'd first try increasing the memory limit, if that still doesn't solve it, I'd try breaking it up and going into sub-albums and applying the change to the sub-albums and not to other sub-albums.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
dkerlee
dkerlee's picture

Joined: 2005-06-09
Posts: 50
Posted: Tue, 2010-04-27 04:24

Found out there was a memory problem:
[Mon Apr 26 21:15:16 2010] [error] [client 70.36.234.32] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted
I upped the memory to 128M from 32M and got ride of that problem only to find another one.

Any more thoughts? thanks!

[Mon Apr 26 21:17:52 2010] [error] [client 70.36.234.32] PHP Warning: fopen(/var/lib/gallery2/g2data/locks/1) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Too many open files in /usr/share/gallery2/modules/core/classes/GalleryPlatform.class on line 337, referer: http://kerlee.com/gallery/main.php?g2_view=core.ItemAdmin&g2_subView=core.ItemEdit&g2_itemId=21334&g2_return=%2Fgallery%2Fmain.php

[Mon Apr 26 21:17:52 2010] [error] [client 70.36.234.32] PHP Warning: GalleryCoreApi::require_once(/usr/share/gallery2/modules/core/classes/../../../modules/core/classes/GalleryStatus.class) [<a href='gallerycoreapi.require-once'>gallerycoreapi.require-once</a>]: failed to open stream: Too many open files in /usr/share/gallery2/modules/core/classes/GalleryCoreApi.class on line 2827, referer: http://kerlee.com/gallery/main.php?g2_view=core.ItemAdmin&g2_subView=core.ItemEdit&g2_itemId=21334&g2_return=%2Fgallery%2Fmain.php
[Mon Apr 26 21:17:52 2010] [error] [client 70.36.234.32] PHP Fatal error: GalleryCoreApi::require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/usr/share/gallery2/modules/core/classes/../../../modules/core/classes/GalleryStatus.class' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/gallery2/modules/core/classes/GalleryCoreApi.class on line 2827, referer: http://kerlee.com/gallery/main.php?g2_view=core.ItemAdmin&g2_subView=core.ItemEdit&g2_itemId=21334&g2_return=%2Fgallery%2Fmain.php

 
dkerlee
dkerlee's picture

Joined: 2005-06-09
Posts: 50
Posted: Tue, 2010-04-27 06:15

Fixed: These guys:
http://gallery.menalto.com/node/32785

Were talking about switching to "database locking", so I did at and it did he trick. Thanks!