From the mind of Jamie Huskisson: Nottingham freelance UK PHP, Magento, Wordpress developer

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 :)

Bookmark and Share

If you enjoyed this post:

Please take the time to leave a comment with any of your thoughts, follow me on Twitter or subscribe to my RSS Feed for automatic updates on all future posts.

There are 12 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>