403 Forbidden when viewing images

Hi there,

I'm working on my first install of ZenPhoto, and have managed to overcome several hurdles so far, using previous advice on the forum.

But I'm stumped on this one issue -- I keep getting a "Forbidden" error when I try to see the picture.

In the gallery view, the thumbnail won't show (though it is on the server; the upload did work).

See:
http://www.zebraphotography.co.uk/galleries/index.php

I've checked permissions on the album folder & subfolders are set to 777.

Though they occasionally revert back to 740 I've noticed. Could this be the problem?

My client's site is being hosted by easily on a Linux server.

Comments

  • acrylian Administrator
    Your problem is not the /albums folder, it is the /cache folder. Setup should try to set the right ones on installing. If you want to set them manually please see:
    http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#29
  • Thanks for the reply acrylian,

    It's not done the trick though -- I've just spent over an hour trying all different permissions between the /cache, /albums and /zp-core folder, and still it won't pull up the images.

    Some things that might be clues to the more initiated than myself! --

    1. I've deleted the setup folder as recommended after setup.

    2. I've set mod rewrite in the admin to OFF -- as otherwise I get a "404 Page not found" when browsing the galleries.

    3. Rewrite base path in .htaccess seems correct:
    RewriteBase /galleries

    4. I've noticed that the file permissions for the /cache and /album folders revert back (usually to 740 -- occasionally to 750) every so often, such as if I close out of my WS_FTP and then open a new connection again.

    5. I've recreated the /cache and /albums directories manually via FTP, as suggested on one forum post. No avail.

    6. I've noticed that if I enter the full path of an image into the browser it says file not found, eg:
    http://www.zebraphotography.co.uk/galleries/tuesday04/sample-wedding-04.jpg
    (but I've checked on FTP and the file is there, definitely)

    7. The admin knows the exact dimensions of the image, and correct file size. So it's definitely processed it.

    8. I've read on the ZP support page that there could be issues with PHP Safe Mode being on. Could this be the culprit for these kinds of symptoms?

    Thanks for any light shed.

    Cat
  • Oh also, I temporarily renamed the .htaccess file in the zenphoto folder ("/galleries") -- no change to the 403 message.
  • acrylian Administrator
    Yes, safe mode can cause such issue. You should ask your host to turn it off.

    To 6.: Yes, of course as that link is wrong, see the missing "albums":
    http://www.zebraphotography.co.uk/galleries/albums/tuesday04/sample-wedding-04.jpg
  • To 6. Now that same path says "Forbidden"... Aaarh! :-)

    I'll get on easily's case about the php safe mode.

    Thanks again
  • Hi again, Here's the update on this --

    Easily have responded and have confirmed that the PHP setting on the server is set to standard, and not safe-mode.

    I've asked them to change the zp-core, albums & cache folders to 755 (as I've understood from the article). They confirmed thay have done this.

    The photos still won't show up though ("forbidden") :-(
    See: http://www.zebraphotography.co.uk/galleries/albums/monday-march-07th/sample-wedding-06.jpg

    However when I look at the properties of the above folders in WS_FTP, I've noticed that they're still not all 755:
    albums -- 745
    cache -- blank!
    zp-core -- 755

    How can this keep resetting itself? I've not come across this before.

    And what can I try next? I'm loathe to suggest a different host to my client in case it's operator-error (me!).

    Thanks again for any suggestions.

    Cat
  • acrylian Administrator
    You have basically three options:
    1. Re-run setup and try to let it set the right permissions
    2. Try to set the right permissions via your FTP client
    3. Again ask your host to set the right ones for them. Please point them to the troubleshooting entry. Setup provides 4 levels from relaxed to very strict. The stricter ones sometimes do not work on servers which is a configuration issue actually (the stricted for example does not work on mine as well).
  • Thanks for that.

    Option 1 - Have tried to reupload the setup folder but it says that's forbidden too. I'll try and reupload the lot & just have a second ZP folder with a different name. Will keep you posted on how I get on.

    Option 2 - Have tried many a time to set the permissions via my FTP client. Every so often they reset themselves.

    Option 3 - Not too keen on this host, having to open a support ticket and they take a day or two to get back each time.

    PLUS!! I've installed ZenPhoto on my own website (different host), which I remembered has a MySQL database available, and it's worked first time, no issues.

    Seeing as I'll also need to installing ZenCart or CubeCart for this client, I think if I may suggest to her to just move hosts!
  • Ok, here's the update on the re-install:

    I've uploaded the freshly-downloaded ZP files (v 1.4.0.2),
    to a separate folder.

    This time I kept the default name "/zenphoto", in case renaming it had mucked something up last time.

    It appeared to work smoother than the previous time; There were no PHP/MySQL warning at the very top of the page, as there had been at first the previous time.

    Also I simply ignored the "warnings" about magic-quotes, etc.
    As long as it was "warnings" and not "errors".

    Used zp2_ as the database field suffixes, so as not to interfere with the first install.

    Didn't delete setup.
    Created a user, and added an image to a new gallery.

    Same problem, the picture is 403-forbidden, though the listing is there, and the file is definitely on the server.

    Went back to setup, changed the permission settings to the less "strict" one (755 as I recall - planning to work my way down the list), hit apply.

    Now... everything in the /zenphoto folder comes up as "500 Internal server error".

    I can't see any more: the set up page, the admin area, not the gallery.

    But interestingly, in my FTP client, the 3 folders are now (seemingly) set to 755! (in this second install -- the original install is still wrong).

    Tried manually setting the permissions in my FTP client, but now it's just stuck on "500 Internal Server Error".

    Does this sound familiar & resolvable?

    Or am I just making life hard for myself with 'Easily' as the host?
  • Sorry to drop in late to this thread. (For those of you who do not know, I am recovering from some surgery.)

    The server is basically screwed up on its file/folder permissions with respect to executing WEB scripts. You might try `loose (0777)` settings. This usually works, but is really not a good choice since it leaves the files/folders open to anyone who can figure out how to access them.

    You can try talking again to the host about what permissions should be used for running WEB scripts. But since your experience with then seems less than resplendent, moving to a different host would probably be a better path. (And then maybe they will listen to the next customer who has these problems.)
  • Thanks sbillard & acrylian,
    Server move suggested to client, she seems (thankfully) open to the idea.
    Cat
  • Just an update...
    We've moved hosts, and it's worked on first try.
    Great to see it working; what a fantastic script.
    Thanks
    Cat
  • I wanted to post a follow up to this, as I was experiencing the problem myself recently, and none of the suggested causes were proving to be the solution. And personally, I don't think that moving hosts is a viable solution.

    In my case, the host had to modify a policy for the web service security module. The error read "Atomiccorp.com WAF rules: Bogus file extensions".

    This was triggered by the .jpg.php perceived multiple file extension in the URL of the image display page.

    After disabling that one rule on the site, everything returned to normal.

    Hope this helps others who have tried everything and still haven't found a solution.

    the blonde weasel
Sign In or Register to comment.