From: [EMAIL PROTECTED]
Operating system: Linux
PHP version: 4.3.0
PHP Bug Type: Reproducible crash
Bug description: imagettftext segmentation fault
imagettftext seems to be impossible to use ;p because it crash apache child
every time it's invoked (there was a similar bug report but problem was
resolved relinking libpng, now it's not a libpng problem, so i've done a
new post)
look here plz:
$im_size = GetImageSize ("image.jpg");
$imageWidth = $im_size[0];
$imageHeight = $im_size[1];
$im = imageCreateTrueColor($imageWidth, $imageHeight);
$im2 = ImageCreateFromJPEG("image.jpg");
ImageCopy ($im,$im2,0,0,0,0, $imageWidth, $imageHeight);
ImageDestroy ($im2);
$black = ImageColorClosest($im, 0, 0, 0);
// Now apache will crash...
imagettftext($im, 15, 0, 40, 90, $black, "arial.ttf", "Ciao");
Header ("Content-type: image/jpeg");
ImageJpeg($im);
ImageDestroy($im);
tail -n 1 error_log:
[Sat Jan 11 19:17:29 2003] [notice] child pid 15648 exit signal
Segmentation fault (11)
i'm using:
libjpeg jpeg-6b
libgd 1.8.3
and php 4.3.0
my configure options are:
--prefix=/usr
--with-bz2
--with-gd
--enable-force-cgi-redirect
--enable-discard-path
--enable-gd-native-ttf
--enable-mime-magic
--enable-ftp
--enable-wddx
--enable-dbase
--enable-bcmath
--enable-sysvsem
--enable-exif
--enable-sysvshm
--enable-sockets
--enable-calendar
--enable-trans-sid
--enable-safe-mode
--enable-versioning
--enable-track-vars
--enable-inline-optimization
--with-config-file-path=/etc/php4
--host=i686-pc-linux-gnu
--without-readline
--with-pam
--with-gettext
--with-openssl
--with-gdbm=/usr
--with-db3=/usr
--with-mysql=/usr
--with-ttf
--with-t1lib
--with-pdflib=/usr
--with-jpeg-dir=/usr/lib
--with-png-dir=/usr/lib
--with-zlib
--with-zlib-dir=/usr/lib
--with-exec-dir=/usr/bin
--with-apxs=/usr/sbin/apxs
--with-xml
--with-dom
--with-mcrypt
--with-mhash
--disable-posix-threads
--with-xpm-dir=/usr/X11R6
ps
if i use imagestring instead of imagettftext it works..
bye bye and thanx
Bonzo
--
Edit bug report at http://bugs.php.net/?id=21586&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21586&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=21586&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=21586&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21586&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=21586&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=21586&r=support
Expected behavior: http://bugs.php.net/fix.php?id=21586&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=21586&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=21586&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=21586&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21586&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=21586&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=21586&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=21586&r=gnused