Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ports/145185: php5-gd error when using png support

162 views
Skip to first unread message

James Bryan

unread,
Mar 29, 2010, 8:45:21 PM3/29/10
to

>Number: 145185
>Category: ports
>Synopsis: php5-gd error when using png support
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Mar 30 00:50:06 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: James Bryan
>Release: 8.0
>Organization:
>Environment:
FreeBSD Sun.Universe.local 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Mon Mar 29 10:38:36 CDT 2010 ro...@Sun.Universe.local:/usr/obj/usr/src/sys/Stardust amd64

>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"

in...@2smi.ru

unread,
Mar 30, 2010, 9:29:52 AM3/30/10
to
On 30 мар, 04:45, spacemunke...@gmail.com (James Bryan) wrote:
> >Number:         145185
> >Category:       ports
> >Synopsis:       php5-gd error when using png support
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       medium
> >Responsible:    freebsd-ports-bugs
> >State:          open
> >Quarter:        
> >Keywords:      
> >Date-Required:
> >Class:          sw-bug
> >Submitter-Id:   current-users
> >Arrival-Date:   Tue Mar 30 00:50:06 UTC 2010
> >Closed-Date:
> >Last-Modified:
> >Originator:     James Bryan
> >Release:        8.0
> >Organization:
> >Environment:
>
> FreeBSD Sun.Universe.local 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Mon Mar 29 10:38:36 CDT 2010     r...@Sun.Universe.local:/usr/obj/usr/src/sys/Stardust  amd64

>
> >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-ports-b...@freebsd.org mailing listhttp://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
> To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscr...@freebsd.org"

I havee too, this error!
Please help...
That error in PNG lib (/usr/ports/graphic/png/)

Alex

unread,
Mar 30, 2010, 2:56:48 PM3/30/10
to
bugfix for ports/145185: php5-gd error when using png support
patch for port php5_gd

--- 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;
}

in...@2smi.ru

unread,
Mar 31, 2010, 4:01:06 AM3/31/10
to

===> 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?

Kami

unread,
Apr 3, 2010, 12:35:29 PM4/3/10
to

Yes, this patch does fix the error for me, but the images are still
not generated.

FlexIDK

unread,
Apr 4, 2010, 2:42:19 AM4/4/10
to


# 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);

free...@gmail.com

unread,
Apr 5, 2010, 12:07:32 PM4/5/10
to
Same problem. The php5-gd and libpng can't work competitively now.
Images can't be processed with new version by now.

mcmxx

unread,
Apr 7, 2010, 3:39:24 AM4/7/10
to
On 5 апр, 19:07, "freeal...@gmail.com" <freeal...@gmail.com> wrote:
> Same problem. The php5-gd and libpng can't work competitively now.
> Images can't be processed with new version by now.

Same trouble.
Apache send notice:

child pid 96322 exit signal Abort trap (6)

when I try to use php-gd with PNG support

0 new messages