>Description:
When using the php5-gd library the following error is encountered when trying to manipulate a png image (eg. resizing a thumbnail):
/libexec/ld-elf.so.1: /usr/local/lib/php/20060613/gd.so: Undefined symbol "png_check_sig"
This problem started to occur after installing png-1.4.1_1.
I re-compiled the GD library, the PNG library and php5-gd module and the error still occurs.
>How-To-Repeat:
Using the png library in conjunction with the php5-gd module and resizing a png image.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-p...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "freebsd-ports-b...@freebsd.org"
I havee too, this error!
Please help...
That error in PNG lib (/usr/ports/graphic/png/)
--- gd_png.c 2009-03-14 19:48:42.000000000 +0200
+++ gd_png.c.new 2010-03-30 21:33:03.000000000 +0300
@@ -138,8 +138,11 @@
if (gdGetBuf(sig, 8, infile) < 8) {
return NULL;
}
-
+#if PNG_LIBPNG_VER >= 10400
+ if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
+#else
if (!png_check_sig (sig, 8)) { /* bad signature */
+#endif
return NULL;
}
===> Vulnerability check disabled, database not found
===> Found saved configuration for php5-gd-5.2.12
===> Extracting for php5-gd-5.2.12
=> MD5 Checksum OK for php-5.2.12.tar.bz2.
=> SHA256 Checksum OK for php-5.2.12.tar.bz2.
===> Patching for php5-gd-5.2.12
===> Applying FreeBSD patches for php5-gd-5.2.12
File to patch: /usr/ports/graphics/php5-gd/work/php-5.2.12/ext/gd/
libgd/gd_png.c
1 out of 1 hunks failed--saving rejects to /usr/ports/graphics/php5-gd/
work/php-5.2.12/ext/gd/libgd/gd_png.c.rej
=> Patch patch-libs-gd-gd_png.c failed to apply cleanly.
=> Patch(es) patch-config.m4 applied cleanly.
*** Error code 1
Stop in /usr/ports/graphics/php5-gd.
*** Error code 1
Stop in /usr/ports/graphics/php5-gd.
how to patch correct?
Yes, this patch does fix the error for me, but the images are still
not generated.
# php gd.php
Array
(
[0] => 183
[1] => 141
[2] => 3
[3] => width="183" height="141"
[bits] => 8
[mime] => image/png
)
PHP Warning: imagecreatefrompng(): '/root/play1.png' is not a valid
PNG file in /root/gd.php on line 8
# tail gd.php
$file = '/root/play1.png';
$a = GetImageSize($file);
print_r ($a);
$s = imagecreatefrompng($file);
Same trouble.
Apache send notice:
child pid 96322 exit signal Abort trap (6)
when I try to use php-gd with PNG support