[SOLVED] No album cover images are displayed. Image URL gives "Error 403 - Forbidden"

oliver_at_ends
oliver_at_ends's picture

Joined: 2010-05-18
Posts: 18
Posted: Wed, 2011-02-23 10:48

Hello,

On Fri 22 Oct 2010, we upgraded our Gallery 3 installation from Gallery 3 RC1 to Gallery 3.0 on our My-Fundraising-Project website.

I got it working with hardly any problems. We continued to use the system without hiccups for several months. On Wed 19 Jan 2011, I deleted an unnecessary album from the gallery, and that's the last record that I can find of my looking at the gallery until yesterday.

Yesterday (Tue 22 Feb 2011), I returned to the gallery, and found that the album cover images were no longer being displayed. I had not changed anything in the code or Gallery 3 admin system in the meantime. The album cover image URLs look something like this:

http://www.my-fundraising-project.co.uk/gallery3/var/thumbs/12th-September-2010-Motorcycle-Run-Essex-Air-Ambulance/First-Third-About-12-15pm-to-12-45pm/.album.jpg?m=1284535843

and when I try to access those URLs directly in a browser, I get "Error 403 - Forbidden".

I have now upgraded from Gallery 3.0 to Gallery 3.0.1, in case that fixed anything, and I also ran the maintenance task invitingly named "Fix your Gallery", but the problem is still there.

Our gallery can be seen here:

http://www.my-fundraising-project.co.uk/gallery3/

Can anyone suggest anything else to try?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2011-02-23 14:13

Show the url to your host. I bet there was a change in permission on those items/albums. I see that some thumbs work ( the random item in the sidebar) so some items/albums have different permissions.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
oliver_at_ends
oliver_at_ends's picture

Joined: 2010-05-18
Posts: 18
Posted: Wed, 2011-02-23 15:37

Thanks, Dave!

I checked the access logs this afternoon, and found that the images became inaccessible during the afternoon or early evening of Thu 17 Feb 2011. Suspiciously, it was during that same afternoon that we got our Web host to fix another, seemingly unrelated problem that had suddenly arisen on some of our websites during the preceding night.

Anyway, I showed the URL to our Web host about half an hour ago. They came up with a fix very quickly, saying:

Quote:
The problem is that the URL uses .album.jpg for the images. By default, files that start with "." are hidden. I added the lines below to your .htaccess file:

<Filesmatch ".album.jpg">
Order deny,allow
</FilesMatch>

So, reading between the lines, my guess is that the Web host made an over-zealous security fix during their fiddling on Thu 17 Feb 2011, to disable access to all "." files, thinking that they would only be system files. Although we didn't spot it at the time, this had the knock-on effect of disabling all the album cover images in our gallery! Still, all seems fine, now.

Thanks again for the hint!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2011-02-24 02:56

Glad you got it sorted and your host was nice enough to look and provide a fix.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
codesmith

Joined: 2009-07-31
Posts: 2
Posted: Wed, 2011-06-15 00:06

I just ran into this problem trying to get Gallery 3 to work with Drupal 7. Drupal 7 has this in its base .htaccess file:

Quote:
# If you do not have mod_rewrite installed, you should remove these
# directories from your webroot or otherwise protect them from being
# downloaded.
RewriteRule "(^|/)\." - [F]

this was overriding the FilesMatch setting. Commented out the rewriterule above and it worked fine. Of course a more specific rewriterule to allow .album.jpg would be preferred if anyone has it. Also, would suggest to Gallery team to not use files beginning with dots. :)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2011-06-15 00:20