Rate this article

Errors on line 638 of Dynamic Charts

Rating: 0.0/5 (0 votes cast)

 Warning: imagepng() [function.imagepng]: gd-png: fatal libpng error: zlib error in /home/account/public_html/includes/MXCharts/mx_charts.inc.php on line 638

Warning: imagepng() [function.imagepng]: gd-png error: setjmp returns error condition in /home/account/public_html/includes/MXCharts/mx_charts.inc.php on line 638

This error is occurs with php 5.x
Here is a short explaination of the cause:

Since PHP v5.1 the GD function imagepng() accepts compression argument. The compression argument must be from 0 to 9. 4images is using the compression settings when creating thumbnails or image resizing for jpeg images which can be from 0 to 100. Because of that using imagepng() function will return fatal error

A fix for this is to change line 638 in the mx_charts.inc.php from

imagepng($image, $this->getRelativePath().$this->getFolder().$this->getFileName(), 90);

to

imagepng($image, $this->getRelativePath().$this->getFolder().$this->getFileName(), 9);

Adobe

ionCube Online PHP Encoder
XMS Systems
Free PositiveSSL and WhoisGuard with Every Domain Purchase

Although we try to ensure all the articles submitted are valid it is your responsibility to make sure you have backups before you use these suggestions on your pc or websites.
We do not take any responsibility for any data-loss, loss in functionality or any problem that might arise in what-ever way or form by making use of the information on this site.

"Friends of Interakt" has no connection to the Adobe Interakt Company