James Little

Archive for the ‘wordpress’ tag

Call to undefined function imagetypes()

leave a comment

{lang: 'en-GB'}

I came across this PHP error after installing the WordPress plugin Contact Form 7 and then using Really Simple CAPTCHA. The exact error given was:
Fatal error: Call to undefined function imagetypes() in ... on line 201.

After searching around for a while, I found that the GD library is required on the server, and (on linux at least) it’s a simple case of installing the library from the repository. So on Ubuntu/Debian, run:
sudo apt-get install php5-gd

and on Redhat/CentOS, etc. sudo yum install php-gd should do the trick. This will install several dependencies, such as the underlying C Library itself.

Obviously if you don’t have full control over your server, you will have to ask your hosting company or administrator to do this for you.

{lang: 'en-GB'}

Written by James Little

October 22nd, 2009 at 8:56 am

Posted in Linux,PHP

Tagged with , ,