ID: 24558
Updated by: [email]sniperphp.net[/email]
Reported By: igor at gelios dot net
-Status: Open
+Status: Bogus
Bug Type: GD related
Operating System: Linux RH7.0, RH9
PHP Version: 4.3.3RC1
New Comment:

We only support bundled GD.



Previous Comments:
------------------------------------------------------------------------

[2003-07-09 04:05:37] igor at gelios dot net

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 this bug report at [url]http://bugs.php.net/?id=24558&edit=1[/url]