Pages

Selasa, 29 Januari 2013

Fix TimThumb for working on EC2

Fix TimThumb for working on EC2

After move your wordpress site on cloud infrastructur like Amazon EC2, might you’ve noticed that a number of images aren’t displaying correctly on your WordPress site. This tip is for anyone using TimThumb (aka "timthumb.php") either directly or indirectly via a WordPress theme (WooThemes uses it a lot) and is not having their thumbnails successfully generated.

There's a good chance that this has to do with the TimThumb script not working correctly. TimThumb is an image resizing script, often used for featured images and thumbnails. The problem is not isolated to eFrog Themes, but is widespread across a lot of themes that use TimThumb as an image resizing mechanism.

Change this code

if(stripos($real, $this->docRoot) == 0){

to

if(stripos($real, realpath($this->docRoot)) == 0){

Hope it will help you to resolve your TimThumb problems with Amazon EC2

Tidak ada komentar:

Posting Komentar