ports/144403: graphics/php5-gd does not load libpng

Dominic Fandrey kamikaze at bsdforen.de
Mon Mar 1 22:30:02 UTC 2010


>Number:         144403
>Category:       ports
>Synopsis:       graphics/php5-gd does not load libpng
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 01 22:30:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Dominic Fandrey
>Release:        RELENG_8
>Organization:
private
>Environment:
FreeBSD mobileKamikaze.norad 8.0-STABLE FreeBSD 8.0-STABLE #1: Tue Feb 23 10:37:52 CET 2010     root at mobileKamikaze.norad:/usr/obj/HP6510b-8/amd64/usr/src/sys/HP6510b-8  amd64
>Description:
It appears that the PHP5 module /usr/local/lib/php/20060613/gd.so, at least on amd64, does not manage to load libpng.so.5, even though ldd is able to locate it.

This causes attempts to load PNG images to fail:
Warning: imagecreatefrompng() [function.imagecreatefrompng]: gd-png: fatal libpng error: [00][00][00][00]: unknown critical chunk in /usr/home/kamikaze/devel/workspace/realmsofsorrow/nightmare/core/nmTemplate.class.php on line 385
Warning: imagecreatefrompng() [function.imagecreatefrompng]: gd-png error: setjmp returns error condition in /usr/home/kamikaze/devel/workspace/realmsofsorrow/nightmare/core/nmTemplate.class.php on line 385
Warning: imagecreatefrompng() [function.imagecreatefrompng]: './templates/neo/layout/header_stretch.png' is not a valid PNG file in /usr/home/kamikaze/devel/workspace/realmsofsorrow/nightmare/core/nmTemplate.class.php on line 385

I expect that saving doesn't work as well, I didn't test it, though.

I do not know whether other platforms are affected. But 2 more people emailed me, that they have the same issue. Both mod_php and php are affected.

For more detail look at my post on ports@:
http://docs.freebsd.org/cgi/mid.cgi?4B8540AB.9040807
>How-To-Repeat:
Try to use PNG image functions with php5-gd on amd64.
>Fix:
I do not know how to fix this, but I am currently using a very clumsy workaround:

# env LD_PRELOAD=/usr/local/lib/libpng.so.5 /usr/local/etc/rc.d/apache22 restart

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list