Segmentation faults uploading images in WordPress

When I tried uploading images I started getting a “HTTP error”. Not all images but quite a lot and it wasn’t just big images or even the biggest images. I noticed this just after the automatic upgrade to WordPress 4.0.1, but having said that I hadn’t done an upload since I had to rollback my web server due to file corruption.

I am running Apache 2.4 on Fedora 18 with PHP 5.4.17.

Then I looked in the Apache logs (httpd) and saw:

[Sun Nov 30 07:51:36.412660 2014] [core:notice] [pid 1194] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Sun Nov 30 07:53:54.850385 2014] [core:notice] [pid 1194] AH00052: child pid 1786 exit signal Segmentation fault (11)
[Sun Nov 30 07:53:55.852319 2014] [core:notice] [pid 1194] AH00052: child pid 2192 exit signal Segmentation fault (11)
[Sun Nov 30 09:05:15.905318 2014] [core:notice] [pid 1194] AH00052: child pid 2628 exit signal Segmentation fault (11)
[Sun Nov 30 09:05:16.907217 2014] [core:notice] [pid 1194] AH00052: child pid 2666 exit signal Segmentation fault (11)

I couldn’t find anything especially helpful and eventually upgraded PHP to 5.4.23 which seemed to resolve the problem.