Home > Uncategorized > GD Library Error: imagecreatetruecolor does not exist (FIX)

GD Library Error: imagecreatetruecolor does not exist (FIX)

I got the Timthumb php script image resizer installed this morning on my windows (IIS) machine, with about an hour of fiddling, here’s what I went through

1. At the start, all php pages were throwing up a php_via_fastcgi error

Reading some blog posts, the diagnostic step was to do this
%WINDIR%system32inetsrvappcmd.exe list config /section:handlers
/text:* | findstr /i PHP
and I got this result;
path:"*.php"
scriptProcessor:"C:Program Files (x86)phpphp-cgi.exe"

Funnily enough that php-cgi.exe file was missing, even though I appeared to have a partial installation of php on my pc.
So I downloaded the manual installer from PHP, and unzipped the files ontop of my php directory.

Now PHP was working

2. After installing timthumb, I saw that no images were appearing, and navigating directly to the PHP script gave this error

GD Library Error: imagecreatetruecolor does not exist – please contact your webhost and ask them to install the GD library
TimThumb version : VERSION

So, the trick was to open PHP.INI with notepad *IN ADMINISTRATOR MODE*

and add the lines
[PHP_GD2]
extension=php_gd2.dll

IISReset, then it worked!

Advertisements
Categories: Uncategorized
  1. October 31, 2010 at 8:56 pm
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: