From: igor at gelios dot net
Operating system: Linux RH7.0, RH9
PHP version: 4.3.3RC1
PHP Bug Type: GD related
Bug description: ImageTFText & ImageFTText crushes Apache child
Description:
------------
See bug #23122.
It's "closed", but bug is still live.
When i build PHP 4.3.3RC1 with bundled GD, ImageTTFText works perfect.
When i build it with external GD (v2.0.15, with the same zlib, libpng,
libjpeg) ImageTTFText (and ImageFTText too) crushes Apache child (
[notice] child pid 548 exit signal Segmentation fault (11)).
Image is drawed, string is outed, but apache child chrushes (probably, on
the next http call).
I try it on two machines: one with RH 7.0 and another with RH 9.0. Result
is the same.
Php configuration:
'./configure' '--with-apxs=/usr/local/apache/bin/apxs'
'--with-gd=../GD/gd-2.0.15' '--with-zlib-dir=../zlib.1.1.4'
'--with-jpeg-dir=../jpeg-6b' '--with-png-dir=../libpng-1.2.5'
'--with-freetype-dir=../freetype-2.1.4' '--enable-gd-native-ttf'
Reproduce code:
---------------
<?
$Width=500;
$Height=200;
$Image = ImageCreate($Width, $Height);
$BgColorHandle = ImageColorAllocate($Image, 200,200,200);
$TextColorHandle = ImageColorAllocate($Image, 0,0,0);
ImageFilledRectangle($Image, 1, 1, $Width-2, $Height-2, $BgColorHandle);
$Font = '/home/httpd/misc/test/verdana.ttf';
$str = 'Test GD string';
ImageFTText($Image, 8, 0, 100, 50, $TextColorHandle, $Font, $str,
array());
Header("Content-type: image/png");
Header("Content-disposition: inline");
ImagePng($Image);
ImageColorDeallocate($Image, $BgColorHandle);
ImageColorDeallocate($Image, $TextColorHandle);
ImageDestroy($Image);
?>
Expected result:
----------------
I expect clean httpd/error_log ;)
Actual result:
--------------
Text string is drawn, but Apache child crushed ( [notice] child pid 548
exit signal Segmentation fault (11)).
--
Edit bug report at http://bugs.php.net/?id=24558&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24558&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24558&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=24558&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24558&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24558&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24558&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24558&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24558&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24558&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24558&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24558&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24558&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24558&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24558&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24558&r=gnused