347 posts Gambit
    Has been part of the Envato Community for over 4 years Has referred 10+ members Has sold $75,000+ on Envato Market and is now an Elite Author Has collected 100+ items on Envato Market
+4 more
bfintal says

Hey guys,

A little help to those who’ve used Timthumb before.

So I just finished a WP theme, but when I was testing it online, the filters for Timthumb weren’t being applied at all on my images.

Here’s an example:

http://themes.amplus.gambit.ph/wp-content/themes/amplus/functions/timthumb.php?src=http://themes.amplus.gambit.ph/wp-content/uploads/2011/02/12979795614923485443_a1967ff888_b.jpg&w=860&h=300&f=5,255,0,0,0

That image should be tinted red because of the GET parameter f=5,255,0,0,0. This is tinted red when I do it locally, but it no filters are applied when it’s online. There’re no PHP errors showing up, and the uploaded code is already tested locally without a hitch. The permissions of the folders are correct, the file is locally available, the PHP version is high enough, GD is supported, everything looks okay.

Anyone got a clue why this is happening? I couldn’t find search online for answers.

347 posts Gambit
    Has been part of the Envato Community for over 4 years Has referred 10+ members Has sold $75,000+ on Envato Market and is now an Elite Author Has collected 100+ items on Envato Market
+4 more
bfintal says

omg, this has something to do with Ubuntu not providing the default package of GD. Anyone knowledgeable in this?

58 posts
    Has been part of the Envato Community for over 5 years Has referred 50+ members Has sold $250,000+ on Envato Market Has collected 10+ items on Envato Market
+5 more
DigitalCavalry says

Yes, TimThumb need GD (maybe in bundled version), and server must have CULR or urlfopen enabled, this information you can find in timthumb file. Maybe cache folder don’t exist or timthumb don’t have access to this folder. Maybe server is blocking timthumb file from executing.

347 posts Gambit
    Has been part of the Envato Community for over 4 years Has referred 10+ members Has sold $75,000+ on Envato Market and is now an Elite Author Has collected 100+ items on Envato Market
+4 more
bfintal says

Yes, TimThumb need GD (maybe in bundled version), and server must have CULR or urlfopen enabled, this information you can find in timthumb file. Maybe cache folder don’t exist or timthumb don’t have access to this folder. Maybe server is blocking timthumb file from executing.

Timthumb is already working, it’s the filter that’s the problem :(

Just found out that doing function_exists(‘imagefilter’) yields false in online server, but it’s true in my local one.

58 posts
    Has been part of the Envato Community for over 5 years Has referred 50+ members Has sold $250,000+ on Envato Market Has collected 10+ items on Envato Market
+5 more
DigitalCavalry says

So the problem is GD library. I f I good remember imagefilter function is implemented in bundled version.

347 posts Gambit
    Has been part of the Envato Community for over 4 years Has referred 10+ members Has sold $75,000+ on Envato Market and is now an Elite Author Has collected 100+ items on Envato Market
+4 more
bfintal says

If ever someone else encountered this problem, DigitalCavalry is spot on. The bundled version is needed by PHP , and TimThumb doesn’t throw any errors if this is not the case.

If you are using an old version of Ubuntu (like me), update the distribution to 10.04. This is faster and better than compiling your own copy of PHP just to get the GD bundled version. :)

by
by
by
by
by
by