Timthumb does not display external site images in a specific domain

I use timthumbs on my Wordpress site. But I included all the changes that I found while looking for this problem.

I have included 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 recreated my .htaccess file. I also included the following code in my .htaccess file.

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

But it does not work in my domain. But it works in a different domain.

The URL of the image I was trying to get is

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

I get 403 denied , I gave permission 0755 to cache the folder.

+4
source share
1 answer

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

Try using a clean and working TimThumb and see if you have this problem.

If you can display an example of a local image, simply add the external domain to the allowed domains.

If you cannot, then this is the most likely incorrect server configuration - try adding the following lines at the beginning of timthumb.php:

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

Source: https://habr.com/ru/post/1447933/


All Articles