How to fix “PHP Fatal error: Call to undefined function imageconvolution()”

If you’re having trouble with uploading images to WordPress (or other PHP frameworks) and seeing blank spots where images should be, read more to discover a possible fix!

If you’re having trouble with uploading images to WordPress (or other PHP frameworks) and seeing blank spots where images should be, you may need to be sure that LibGD is installed.  Check your Apache or Nginx logs for fatal PHP errors which occur when trying to call undefined functions, for example:

  • PHP Fatal error:  Call to undefined function imageconvolution()
  • PHP Fatal error:  Call to undefined function imagerotate()
  • PHP Fatal error:  Call to undefined function imagecreatefromjpeg()
  • … and other newer GD functions

Here’s an example I gathered from an Nginx log after attempting to rebuild some thumbnails in WordPress using the AJAX Thumbnail Rebuild plugin:

So, let’s fix it!

Even if you’re on the latest Ubuntu 14.04, you may find yourself in a situation where your installed version of PHP was not compiled with libgd, or it is not installed via your package manager.  In that case, it’s easy to install!  For the most part, you shouldn’t have to recompile PHP, so try installing/updating libgd using your package manager.

From the libgd FAQs page:

If you want gd for a PHP application, just do (for Fedora):

Or, for Red Hat Enterprise Linux or CentOS:

Then do:

If your system is Debian based (Debian/Ubuntu/…) then you need to install php5-gd package:

Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014)

About a month ago, I gave a talk at WordCamp Austin 2014 about running enterprise-class WordPress in clustered, cloud-hosted environments. Thanks to all who attended, and for your great questions! While it was standing room only for “Cluster Fudge: Recipes for WordPress in the Cloud”, I hope that everyone who wanted to get in was able to see my presentation.

I’d love to keep the discussion going, so feel free to offer your own best practices and tips for success in running WordPress in the cloud at scale! You can leave comments at the bottom of the page.

About a month ago, I gave a talk at WordCamp Austin 2014 about running enterprise-class WordPress in clustered, cloud-hosted environments.  Thanks to all who attended, and for your great questions! While it was standing room only for “Cluster Fudge: Recipes for WordPress in the Cloud“, I hope that everyone who wanted to get in was able to see my presentation.

I’d love to keep the discussion going, so feel free to offer your own best practices and tips for success in running WordPress in the cloud at scale!  You can leave comments at the bottom of the page.

Overview

Your self-hosted WordPress site is quickly growing in popularity and page views. Or maybe you want to get away from that costly enterprise CMS currently on your plate and adopt a delectable, open-source platform. There are many reasons you might need the performance and redundancy of a clustered server solution, and I’ll show you how to mix up the ingredients needed to throw together a successful cloud-hosted WordPress environment that’s right for you.

We’ll talk about common multi-server configurations, from cheap and quick for the cost-conscious business, to robust and complex for the high level of control an enterprise demands. You will leave with a better knowledge of which web server makes sense for your requirements, and learn some tips and tricks to better caching without sacrificing the dynamic nature of WordPress.

Downloadable code snippets and example config files will help get you started in your own cloud environment.

Example Code and Configuration Files

Visit my GitHub repo for examples of server configuration files optimized for WordPress, and PDF versions of my slides with speaker notes.

Slides

If you missed it, you can view my slides embedded from SlideShare below.

 

Googlebot can’t access your site (Scary, right?)

Yesterday, many Google Webmaster Tools users received unpleasant notifications that their websites were suddenly inaccessible to Google.  After 2 hours of aggressive troubleshooting last night, and another couple hours spent this morning, it seems that this may be an issue on Google’s side.  Search Engine Roundtable just posted an article confirming more reports of problems with Google accessing robots.txt.

In my own case, the naked msdf.org/robots.txt URL is accessible from every other browser, device, and third-party tool in my arsenal, yet Google has about a 80% error rate in accessing my robots.txt file.  While the www version is working perfectly with no crawl errors or problems fetching as Googlebot, the non-www version is having much less success.  (Please note, you may also receive duplicate “Googlebot can’t access your site” errors for both www and non-www versions.)

Attempting to use the Fetch as Google tool within Webmaster Tools was helpful in understanding the problem, but ultimately the problem seems to be with Google, and your site’s index status is likely just fine. (Whew!)  But use caution in writing off warnings from Google, you could very well be receiving these email warnings for good reason, especially if you received them before yesterday (on or before April 25, 2013).

Matt Cutts commented on the Google forum discussion earlier, acknowledging this could be an issue with Google, so I recommend you check that forum thread out.  I’ll keep an eye on this until a resolution comes around, but if you’ve already tested your site in the Fetch as Google tool and all other bots are working normally, you may actually be able to do something you almost never (ever) want to do – ignore a Google Webmaster Tools alert.

 

UPDATE  (2013-Apr-27)

Google’s John Mueller has indicated that this issue should now be resolved.  https://productforums.google.com/d/msg/webmasters/mY75bBb3c3c/ARQqAWOf_6YJ

 

Apache HTTP Won’t Start Because Port 80 is Being Used?

Try uninstalling Web Deploy 2.0.  I’ve had IIS and Apache running smoothly for months on a new machine, and suddenly after installing SQL Server 2008 R2 and some Silverlight (yuck) tools to maintain an existing app, Apache reported that port 80 was already taken by “Microsoft HTTPAPI/2.0”.  I think it snuck in, along with an unwanted install of IIS 7.5 Express, via the Web Platform Installer.  Thanks for stealing 2 hours of my productivity from me, Microsoft.  (I don’t get why MS would install that so greedily, and I already had the full version of IIS installed, btw.  I hate that Web Platform Installer shit.)

The Web Deploy tool is not something most of us use, in fact I don’t know anybody who uses it at all.  So it’s pretty safe to get rid of.