简体   繁体   中英

Timthumb didn't display external site images in specific domain

I am using timthumbs in my wordpress site. But I included all the changes which I found when I search for this problem.

I have enabled the "ALLOW_EXTERNAL" and "ALLOW_ALL_EXTERNAL_SITES" .

   //Image fetching and caching
if(! defined('ALLOW_EXTERNAL') )            
define ('ALLOW_EXTERNAL', TRUE);                        
// Allow image fetching from external websites. Will check against ALLOWED_SITES if ALLOW_ALL_EXTERNAL_SITES is false

if(! defined('ALLOW_ALL_EXTERNAL_SITES') )
 define ('ALLOW_ALL_EXTERNAL_SITES', true);

I have recreated my .htaccess file . I Have also included the following code in my .htaccess file.

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

But it is not working in my domain. But it is working in other domain.

Image URL which I tried to access is

URL : http://webhugh.org/viyugam/timthumb/timthumb.php?src=http://farm3.static.flickr.com/2340/2089504883_863fb11b0a_z.jpg

I am getting 403 forbidden , I gave 0755 permission to cache folder as well.

You are getting a 500 Internal Server Error whenever you try to access timthumb directly, or if you pass a local image to it(for instance http://webhugh.org/viyugam/timthumb/timthumb.php?src=/images/webhugh-slider-background.png&w=100&h=100 ).

Please try using a clean and working TimThumb and see if you still have that issue.

If you can render the local image example, then just add the external domain to your allowed domains.

If you can't then it's most-likely server misconfiguration - try adding the following lines at the beginning of timthumb.php:

error_reporting(E_ALL);
ini_set('display_errors', '1');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM