A solution to the PHP5, GD, libpng “Abort trap (6)” bug

My WordPress has been acting up recently, throwing mysterious “IO Error” errors every time I was trying to upload a PNG file. Upon closer examination of the Apache logs I’ve found yet another cryptic error line for every failed upload attempt:

[notice] child pid 14139 exit signal Abort trap (6)

Reinstalling the PHP5, GD and libpng failed to fix this for me, so I’ve decided to check the loading order of the PHP extensions in the extensions.ini. Indeed, the gd.so was being loaded the last. Moving the “extension=gd.so” line to the top of the list fixed this problem for me after a restart of Apache.

So give it a try before googling for the “Abort trap (6)” error like I did, the search results contained mostly mailing list noise and bug reports fixed in earlier versions of PHP.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.