#23122 [Com]: ImageTTFText causes segmentation fault while under Apache
| From: | babansky at mail dot ru | Date: | Sat, 16 Aug 2003 11:37:03 +0000 |
| Subject: | #23122 [Com]: ImageTTFText causes segmentation fault while under Apache | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-46012@lists.php.net to get a copy of this message | ||
ID: 23122
Comment by: babansky at mail dot ru
Reported By: 1413 at blargh dot com
Status: Closed
Bug Type: GD related
Operating System: Debian Linux
PHP Version: 4.3.2-RC
New Comment:
This bug is not closed!!! My bug report # 24455:
http://bugs.php.net/?id=24455
Previous Comments:
------------------------------------------------------------------------
[2003-07-06 05:28:33] igor at gelios dot net
ImageFTText gives same SegFault ;(
------------------------------------------------------------------------
[2003-07-06 05:21:21] igor at gelios dot net
This bug is not completly closed. ;(
I have same troubles with PHP _4.3.2_
Linux RH9, Apache 1.3.27, gd 2.0.15, freetype 2.14
PHP Configure options:
'./configure' '--with-apxs=/usr/local/apache/bin/apxs'
'--with-mysql=/usr/local/mysql' '--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'
test script (see below) draw test line correctly, but apache child
crashes with log message:
[Sun Jul 6 14:14:24 2003] [notice] child pid 28704 exit signal
Segmentation fault (11)
test script:
<?
$Width=500;
$Height=200;
$Image = ImageCreateTrueColor($Width, $Height);
$BgColorHandle = ImageColorAllocate($Image, 200,200,200);
$TextColorHandle = ImageColorAllocate($Image, 0,0,0);
ImageFilledRectangle($Image, 1, 1, $Width-2, $Height-2,
$BgColorHandle);
$Font = '/usr/home/httpd/misc/admin/syscounters/verdana.ttf';
ImageTTFText($Image, 8, 0, 100, 50, $TextColorHandle, $Font, 'Test GD
string');
Header("Content-type: image/jpeg");
Header("Content-disposition: inline");
ImageJpeg($Image);
ImageColorDeallocate($Image, $BgColorHandle);
ImageColorDeallocate($Image, $TextColorHandle);
ImageDestroy($Image);
?>
------------------------------------------------------------------------
[2003-04-30 12:15:05] eru@php.net
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2003-04-30 12:06:50] eru@php.net
Works for me now, no more segfaults.
------------------------------------------------------------------------
[2003-04-30 11:44:03] rasmus@php.net
I think I just fixed this issue. The bt doesn't look the same, but the
fact that it only happens on the second request would indicate that it
was getting a bogus cache pointer which is what I fixed. Someone
please verify that this doesn't happen under current CVS.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/23122
--
Edit this bug report at http://bugs.php.net/?id=23122&edit=1