justacoder
justacoder

Reputation: 2704

500 Error on Timthumb

Here's the image that was uploaded: http://proppedupcreations.com/uploads/portfolio/fullsize/p036.jpg

You can view the image in the gallery here; top left: http://www.proppedupcreations.com/index.php?page=portfolio&categorylink=photoshoot

I am getting this error when clicking it in the gallery: Image cannot be loaded. Make sure the path is correct and image exist. This only occurs on a few select ones for no obvious reason (is it ever?). The thumbnail displays fine, but viewing the larger version fails.

And here's the same image when directly linking to it via timthumb, which shows the 500 error with an additional zero displayed: http://proppedupcreations.com/timthumb.php?src=/uploads/portfolio/fullsize/p036.jpg&w=800&zc=1&q=90

Upvotes: 1

Views: 2004

Answers (2)

friglob
friglob

Reputation: 11

This just worked for me:

  1. Check to make sure the file permission is set to 700 (read, write, and execute for owner only).
  2. Check the Directory (folder) permission. Setting it to 777 will give you a 500 – Internal Server Error. Set it to 711.

Upvotes: 0

Michael
Michael

Reputation: 402

As you mentioned, this link fails:

http://proppedupcreations.com/timthumb.php?src=/uploads/portfolio/fullsize/p036.jpg&w=800&zc=1&q=90

Then all I do is change the size and it works fine:

http://proppedupcreations.com/timthumb.php?src=/uploads/portfolio/fullsize/p036.jpg&w=626&zc=1&q=90

626px wide was the biggest I could make it before it threw the 500 error. That's very weird because usually size issues with TimThumb relate to the image being processed, not the resulting image (i.e. any width size in your URL would fail).

The only other common issue with TimThumb is that your /cache/ directory permissions are not 777 or 755. Maybe the permissions were ok before and some images were cached, and now the permissions are wrong. And maybe p036.jpg has a cached image big enough to create a 626px wide image, but any bigger and it tries to work with the actual image again and create a new cache image but fails to write it. What are the permissions of your /cache/ folder?

Just spit-balling here.

Upvotes: 1

Related Questions