gd errors after rebuilding PHP

Антон Клесс antoniok.spb at gmail.com
Wed Mar 17 13:24:02 UTC 2010


I have updated PHP from ports, now it is:

# uname -a
FreeBSD host.net 6.2-RC1 FreeBSD 6.2-RC1 #4: Fri Mar  5 01:37:03 MSK
2010     root at host.net:/usr/obj/usr/src/sys/MYKERN  amd64

$ php -v
PHP 5.2.12 with Suhosin-Patch 0.9.7 (cli) (built: Feb 21 2010 23:16:07)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

$ php -m
[PHP Modules]
bcmath
bz2
ctype
curl
date
dom
exif
filter
ftp
gd
gettext
gmp
hash
iconv
json
libxml
mbstring
mhash
mysql
mysqli
openssl
pcre
pdf
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
sockets
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]


And no it started to get such errors:


[17-Mar-2010 16:07:19] PHP Warning:  imagecreatefrompng(): gd-png:  fatal
libpng error: [00][00][00][00]: unknown critical chunk in
/path-to-file/file.php on line 15
[17-Mar-2010 16:07:19] PHP Warning:  imagecreatefrompng(): gd-png error:
setjmp returns error condition in /path-to-file/file.php on line 15
[17-Mar-2010 16:07:19] PHP Warning:  imagecreatefrompng(): 'button.png' is
not a valid PNG file in /path-to-file/file.php on line 15
[17-Mar-2010 16:07:19] PHP Warning:  imagecolorallocate(): supplied argument
is not a valid Image resource in /path-to-file/file.php on line 16
[17-Mar-2010 16:07:19] PHP Warning:  imagecolorallocate(): supplied argument
is not a valid Image resource in /path-to-file/file.php on line 17
[17-Mar-2010 16:07:19] PHP Warning:  imagestring(): supplied argument is not
a valid Image resource in /path-to-file/file.php on line 18
[17-Mar-2010 16:07:19] PHP Warning:  imagestring(): supplied argument is not
a valid Image resource in /path-to-file/file.php on line 19
[17-Mar-2010 16:07:19] PHP Warning:  imagestring(): supplied argument is not
a valid Image resource in /path-to-file/file.php on line 20
[17-Mar-2010 16:07:19] PHP Warning:  imagepng(): supplied argument is not a
valid Image resource in /path-to-file/file.php on line 21
[17-Mar-2010 16:07:19] PHP Warning:  imagedestroy(): supplied argument is
not a valid Image resource in /path-to-file/file.php on line 22


I tried to re-build PHP, but it don't helped.

# pkg_info |grep png
png-1.2.42          Library for manipulating PNG images
ruby18-libpng-0.3.3_3 A libpng wrapper class for Ruby


Any suggestions?


More information about the freebsd-questions mailing list