jperezmedina / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

TimThumb issue with WordPress installed in Subdirectory... #258

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
With some hosting providers where instances of WP that were installed in a 
subdirectory were causing TimThumb to not be able to find the images. For 
example, the URL to the WP instance might look like this www.some-domain.com/wp/

When I did right-click "View Image" the error message displayed was:

The following error(s) occurred:

    Could not find the internal image you specified.
...

Yet, I can open the image directly in the browser using the image src URL, so I 
know the image is accessible.

My client contacted support at their host and this is how they were able to 
resolve it, here's a copy of the email:

"Ok, I enabled debug logging in your timthumb.php script and saw the following 
logged in our httpd error log:

   "Trying file as:
   /home/comhyuoes/webapps/dev2_
wp/wp/wp-content/uploads/2011/09/some-image.jpg"

So, it's looking for a 'wp' directory on the filesystem even though we've set 
the document root to /home/comhyuoes/webapps/dev2_wp.

I don't know why it's doing that, so I can't tell you how to properly fix it.

However, as an ugly workaround, I created a recursive 'wp' symlink inside of 
your app directory. With that in place, your thumbnails are now working."

What version of the product are you using? On what operating system?
TimThumb 2.8 (the latest to date)
WordPress 3.2.1

Any ideas what might be causing this??
Regards

Original issue reported on code.google.com by andon.de...@gmail.com on 6 Sep 2011 at 12:59

GoogleCodeExporter commented 8 years ago
Same here, although I haven't been able to get a workaround.

A theme tries the following link:

http://chofa.com.mx/wp-content/themes/blacklabel/framework/timthumb.php?src=http
://chofa.com.mx/files/2011/09/fondo_blanco.jpg&h=230&w=590

That doesn't work, while this one (edited manually with the absolute path):

http://chofa.com.mx/wp-content/themes/blacklabel/framework/timthumb.php?src=http
://chofa.com.mx/wp-content/blogs.dir/16/files/2011/09/fondo_blanco.jpg&h=230&w=5
90

Works.
Any thoughts?

Original comment by diego.al...@gmail.com on 19 Sep 2011 at 4:02

GoogleCodeExporter commented 8 years ago
Probably because you have . (dot) in directory name. Don't know exacly regex 
for timthumb, but seems like that this can be problem. 

Original comment by djevrek on 19 Sep 2011 at 5:08

GoogleCodeExporter commented 8 years ago
But that's the usual WordPress structure for a multiblog, ain't it?
I haven't modified my WP.

Original comment by diego.al...@gmail.com on 19 Sep 2011 at 5:14

GoogleCodeExporter commented 8 years ago
There is fix already, just google for it. Tip 
http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/

Original comment by djevrek on 19 Sep 2011 at 5:41

GoogleCodeExporter commented 8 years ago

Original comment by BinaryMoon on 3 Oct 2013 at 7:12