php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24558 ImageTFText & ImageFTText crashes Apache child
Submitted: 2003-07-09 04:05 UTC Modified: 2003-09-30 19:54 UTC
From: igor at gelios dot net Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.3.3RC1 OS: Linux RH7.0, RH9
Private report: No CVE-ID: None
 [2003-07-09 04:05 UTC] 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)).


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-09 08:39 UTC] sniper@php.net
We only support bundled GD.

 [2003-07-09 08:40 UTC] sniper@php.net
And this is likely fixed in CVS..after RC1 was released.

 [2003-07-10 01:06 UTC] babansky at mail dot ru
I already reported this bug (see # 24455)
and got not reply up to date
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 05 09:01:33 2025 UTC