My favorites | Sign in
Project Home Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 363: Could not find the internal image you specified
12 people starred this issue and may be notified of changes. Back to list
Status:  NotBug
Owner:  ----
Closed:  Dec 2012


Sign in to add a comment
 
Reported by oldstep...@dmacmedia.ie, Apr 3, 2012
What steps will reproduce the problem?
1. There are no steps to reproduce the problem, have a look at josephestates.ie
2. Here you will see the images on the home screen are not appearing.
3. This only happens with images that are host on the site, I can run the script ( from the site ) referencing external images and there is no issue. 

What is the expected output? What do you see instead?
I'm expecting to see the images resized according to the parameters I set. I'm not seeing any image at all.

What version of the product are you using? On what operating system?
I'm using the latest version of the product, 2.8.10

Please provide any additional information below.

Apr 3, 2012
#1 oldstep...@dmacmedia.ie
I'm using nginx.
Apr 13, 2012
#2 yuvi2...@gmail.com
I am also facing this problem with my wordpress installation, please help me too.
Apr 19, 2012
#3 ashizak916
i am also facing error
 my site showing this
-----------------------------------------------------------------
A TimThumb error has occured

The following error(s) occured:
Could not find the internal image you specified.


Query String : src=http%3A%2F%2Fwww.discusswire.com%2Fwp-content%2Fuploads%2F2012%2F04%2Fcentos.png&h=309&w=640&zc=1
TimThumb version : 2.8.10
-------------------------------------------------------------------------
Apr 27, 2012
#4 morales0...@gmail.com
I have the same trouble, i have tried with the fixes from previous posts, and they have not worked any of them, the only thing i know is that you have to elimante the address from the url, for examples instead of saying src=http%3A%2F%2Fwww.discusswire.com%2Fwp-content%2Fuploads%2F2012%2F04%2Fcentos.png&h=309&w=640&zc=1 it should look src=wp-content%2Fuploads%2F2012%2F04%2Fcentos.png&h=309&w=640&zc=1 but i dont know php

May 3, 2012
#5 pen...@gmail.com
Same problem here!! It's so sad that such a good script has so many problems to work easily... On the official page there's no reference what so ever to this problems. And not a word from the developers
May 4, 2012
#6 jessehew...@gmail.com
I am having the same problem as well.  I think it has to do with using multisite in wordpress though.  I am working on a solution trying to make it so timthumb gets the right url for the image.
May 4, 2012
#7 jessehew...@gmail.com
Hopefully this will help someone.  It probably is not the best solution, but it got it to work for me.  If you are using multisite with wordpress and are getting the TimThumb error where it cannot find the internal image you specified then try this:

You may be currently linking your image like this:
<img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?> />

This will use a filtered link, and not the actual path to the image file.  

To unfilter it try using this:
<?php $image = get_attached_file( get_post_thumbnail_id( $post->ID ), true ); ?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $image; ?> />

The get_attached_file( $attachment_id, $unfiltered ); function can return an unfiltered image url which worked in my case.

Happy Coding.

May 4, 2012
#8 ivonec...@gmail.com
My $_SERVER['DOCUMENT_ROOT'] is appending a underline after the server path (timthumbs.php, line 799). I don't know why. 
To workaround this issue, I simply remove the underline using the bottom code.
I know that this is not the best option but works for me.

put this code:
$docRoot = substr($docRoot, 0, strlen($docRoot) - 1);

immediately before this code (line 845):
$this->docRoot = $docRoot;
May 7, 2012
#9 morales0...@gmail.com
use this, it's an old version but surely it wont have the same mistakes as the new version, i dont know if it has bugs, but it works thats what matter to me
timthumb.php
19.6 KB   View   Download
Jul 23, 2012
#11 e301...@gmail.com
The solution from comment#9 worked well for me.
Is there any functionality or security problem having to do with using this reduced/older version of timthumb? 
Sep 6, 2012
#12 tuq...@gmail.com
Same problem but now with the .php of the comment #9 it works!!!
Sep 21, 2012
#13 kudub...@gmail.com
Comment #9 works after an hour or so trying to figure it out, thanks!
Sep 24, 2012
#14 S4nG...@gmail.com
Ty  #9 ! 
Sep 25, 2012
#15 gravityf...@gmail.com
I can't see what version #9 has posted here. The oldest safe version is 2.8.2. Anything older than this is vulnerable
Oct 13, 2012
#16 dodangti...@gmail.com
Thank you Comment 9. It works
Oct 26, 2012
#17 donnie...@gmail.com
comment#9 thank you... It works for me... I think the old much work fine and rid the new version :) rockpinoy
Oct 31, 2012
#20 gofree.s...@gmail.com
#18, so how do you make change to get it work?
Oct 31, 2012
#22 gofree.s...@gmail.com
#7, where do you put this line?
Oct 31, 2012
#23 ad...@soweic.com
Found solution:

JACOB RACCUIA
I was able to fix my issue by doing TWO things.

I turned this line to true: [line 33]

if(! defined('ALLOW_ALL_EXTERNAL_SITES') ) define ('ALLOW_ALL_EXTERNAL_SITES', TRUE);	// Less secure.

and I commented out this line [line 212]
//$this->src = preg_replace('/https?:\/\/(?:www\.)?' . $this->myHost . '/i', '', $this->src);

Whether or not this is an appropriate way, it is the fix I found to work after 8+ hours of troubleshooting.

Hopefully this helps some people!

Source: http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/
Nov 4, 2012
#24 akmur...@gmail.com
thanks  ad...@soweic.com
Nov 8, 2012
#25 touqeer....@gmail.com
My using it on my own mvc the url of the image is something like this

http://174.120.189.92/~touqeer/cms/application/lib/timthumb/timthumb.php?src=/~touqeer/cms/content/uploads/Jellyfish.jpg&w=610&h=300

 can some body please help me with this :( 


Nov 26, 2012
#26 jarredsp...@gmail.com
thanks

Comment 23 by ad...@soweic.com, Oct 31, 2012

Nov 29, 2012
#27 salvap...@gmail.com
Comment 9 work fine ! thanks for that, that's only what counts. 
Dec 3, 2012
Project Member #28 BinaryMoon
(No comment was entered for this change.)
Status: NotBug
Dec 25, 2012
#29 zzlal...@gmail.com
line number 825
comment $docRoot = @$_SERVER['DOCUMENT_ROOT'];
and add $docRoot = dirname(__FILE__);
Jan 10, 2013
#30 vuar...@gmail.com
Thank you Comment 23. It works.

:)

Jan 25, 2013
#31 one...@gmail.com
NotBug? of course that is a bug...
Feb 8, 2013
#32 baade...@gmail.com
Had the same error. My error was simply the filename of the pic. There was a "+" at the filename. "pic123+internet.jpg" after renaming "pic123internet.jpg" all works fine.

Feb 19, 2013
#33 jpolloc...@gmail.com
#23 - Thank you! :)
Apr 1, 2013
#34 ikadimi
I you it on WordPress Network, you will have to fix your theme as described here: http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/

This error is caused by the way WordPress Network delivers attachements in blogs, i.e, this line in .htaccess:

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

So beware theme designers, make your themes WP Network ready, it's not very hard.
Apr 1, 2013
#35 ikadimi
Me again (#34). On a second thought, I don't like to expose the real paths to files. So you can always simply disable replacing current host and add it dynamically to allowed sites with these two steps:

== STEP 1 ==
comment out line 212 or so depending on your version (I'm on version 2.8.11), the line is:
		$this->src = preg_replace('/https?:\/\/(?:www\.)?' . $this->myHost . '/i', '', $this->src);

== STEP 2 ==
Use your IDE search function and look for "flicker", and add a line above, like so:
if(! isset($ALLOWED_SITES)){
	$ALLOWED_SITES = array (
		preg_replace('/^www\./i', '', $_SERVER['HTTP_HOST']), 
		'flickr.com',
		'staticflickr.com',
		'picasa.com',
		'img.youtube.com',
		'upload.wikimedia.org',
		'photobucket.com',
		'imgur.com',
		'imageshack.us',
		'tinypic.com',
	);
}
Apr 1, 2013
#36 ikadimi
@BinaryMoon - #28 - I'm gonna agree with you.
Apr 22, 2013
#37 kwadwo...@gmail.com
Comment #23 worked for me, thanks!
Apr 22, 2013
#38 matiasco...@gmail.com
Comment #23 worked for me too!!!
Apr 22, 2013
#39 anonymous84327
@BinaryMoon (#28) it's nice from you to come here and just tag this as "NotBug" however there is clearly something wrong to investigate and many people here are willing to help solving this issue. You don't even put any comment to justify your decision, this is just wrong closed minded way of acting/thinking, you should either not be part of the project, or your project should not be declared as Open Source and listed on Google Code if you're not willing to recognize and help solving real bugs like this very one.
Jul 4, 2013
#40 mohsen....@gmail.com
Thanx ad...@soweic.com
Comment #23 work for me too.

Jul 14, 2013
#41 tox...@gmail.com
#29 worked for me
Aug 26, 2013
#42 intelsys...@gmail.com
#23 worked for me!! here I attach my working file.

Regards.

Juan M. Sánchez
Web Designer www.intelsys.es
thumb.php
50.6 KB   View   Download
Sep 6, 2013
#43 leonardo.ciaccio
Hi all,
i have hosted my site on www.altervista.org and i have found this solution, only comment:

BEFORE
$docRoot = @$_SERVER['DOCUMENT_ROOT'];

AFTER
//$docRoot = @$_SERVER['DOCUMENT_ROOT'];

on this post
http://forum.it.altervista.org/wordpress/145847-timthumb-php-su-altervista-le-miniature-non-funzionano.html

Work fine for me, i hope this help.

Leonardo Ciaccio
microlabs.altervista.org
Sep 10, 2013
#44 RichSmar...@gmail.com
Thank #43 leonardo.ciaccio

It's work.
Nov 22, 2013
#45 handyver...@gmail.com
#9 Can anyone tell me where I need to put that .PHP file the user kindly uploaded for us?
Dec 12, 2013
#46 d...@alignideas.com
#42 copy worked for me. Was about to throw my laptop against the wall. Thank you Juan
Jan 24, 2014
#47 udayasricl@gmail.com
thanks #9 wworks for me too 
Feb 19, 2014
#48 luciano....@gmail.com
#43
Thank you very much, perfect solution for who's on Altervista :)

After many hours got miniatures working :)

Really thank you!
Jun 11, 2014
#49 past...@gmail.com
#23 thank you very much man! it worked!
Jun 16, 2014
#50 sidney....@gmail.com
Thank you! #9 worked fine!
Aug 6, 2014
#51 anderson...@gmail.com
Thanks!!!! @ad...@soweic.com
Sign in to add a comment

Powered by Google Project Hosting