From the mind of Jamie Huskisson: From a full-time freelance PHP developer, to the managing director of Rolled Limited

From PHP 4 to PHP 5.. PHP Fatal zlib error: imagepng()

Posted on January 3rd, 2007 in

Getting this error?

PHP Fatal error: imagepng() [function.imagepng]: gd-png: fatal libpng error: zlib error in example.php on line 10

Fix it easily by changing your compression variable of imagepng, imagegif or imagejpg/imagejpeg into a 1-10 ranged number - instead of the PHP 4 1-100 standard.

It should work smoothly now :)

There are 4 responses to this post so far

Feel free to use any of the following tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>