How to fix readfile error from TimThumb script


5 Votes, Rating: 3.81 Star2 Stars3 Stars4 Stars5 Stars

Tags: ,

TimThumb script is a nice script to convert images into thumbs on the fly, but on some servers it shows

Warning: readfile() has been disabled for security reasons.

Actually to develop this script they used wrong function, coz many server disable this service for all due to hacking problem. by this function your server can be hacked remotely.

nevermind. the soluton how to use such a nice script without readfile() function.

Solution

you need to search out this line in timthumb script.

readfile ($cache_file);

version 1.14 ( line 510)

now replace this code with this

echo file_get_contents( $cache_file );

and it works.

enjoy.

 

Share/Save/Bookmark

Leave a Reply