Main menu:

Site search

Categories

Archive

What the ????? upgrade to php 5.1 and I get broken PNG… gd-png: fatal libpng error: zlib error in

So I did an upgrade from php 4.2.2 to 5.1.something… and now my PNG that are dynamically created on the fly are all broken… I found the solution.

After looking in the error logs for apache and finding the following

gd-png: fatal libpng error: zlib error in

I went and check the manual for imagepng. It seems that the compression arguement has changed to only accept 0-9 instead of the old 0-100. Change the arguement and bingo, it works!

Write a comment