Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2010
    Posts
    9
    Plugin Contributions
    0

    Default Warning: imagepng() [function.imagepng]: gd-png: fatal libpng error: pe_functions.php

    Hello,

    I recently took over the maintenance of a ZenCart 1.3.8 site (PHP Version 5.2.6, MySQL 5.0.75), and in a customized add-on module, after selecting "Proceed to Checkout", I am getting the following error messages before the PayPal checkout page comes up:

    Warning: imagepng() [function.imagepng]: gd-png: fatal libpng error: zlib failed to initialize compressor -- stream error in .../htdocs/<module name>/pe_functions.php on line 34

    Warning: imagepng() [function.imagepng]: gd-png error: setjmp returns error condition in .../htdocs/<module name>/pe_functions.php on line 34
    Processing please wait..........

    Here is the referenced line 34 in the pe_functions.php file:
    imagepng($im,"$filename",80);
    ... with this comment above it: //imagetruecolortopalette($im, true, 256); // set palette

    I am completely stumped on how to troubleshoot this; I tried searching in the Developer's Toolkit for the various tags in the code but didn't find anything. I also found this posting in the forum: http://www.zen-cart.com/forum/showth...light=imagepng --- but nothing has been moved in this module, and it doesn't appear as though any files are missing.

    Does anyone have a suggestion on how to fix this, or could someone please tell me how to troubleshoot this?

    Thank you.

  2. #2
    Join Date
    Sep 2009
    Posts
    49
    Plugin Contributions
    0

    Default Re: Warning: imagepng() [function.imagepng]: gd-png: fatal libpng error: pe_functions

    I think the background of this error is a change in the imagepng php function. The quality parameter should now be between 0-9

    Change the following line and give it a try

    From
    PHP Code:
    imagepng($im,"$filename",80); 
    To:
    PHP Code:
    imagepng($im,"$filename",8); 

 

 

Similar Threads

  1. Replies: 6
    Last Post: 21 Jun 2012, 12:16 AM
  2. Replies: 0
    Last Post: 10 Nov 2008, 02:37 PM
  3. after site move getting error: imagepng() gd- ... bmz_image_handler
    By marksu in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 31 Aug 2008, 07:24 AM
  4. Replies: 2
    Last Post: 11 Feb 2008, 08:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg