|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21445 imagettfbbox and imagettftext fail with warning
Submitted: 2003-01-05 16:29 UTC Modified: 2003-01-05 18:47 UTC
From: soletan at toxa dot de Assigned:
Status: Closed Package: GD related
PHP Version: 4.3.0 OS: SuSE Linux 7.2
Private report: No CVE-ID: None
 [2003-01-05 16:29 UTC] soletan at toxa dot de
I've update my 4.2.3 to freshly published 4.3.0. It works 
with Apache 2.0.40 here ... 
Nearly everything's fine. I used some script that 
dynamically generates images with text in them. Under 
4.2.3 everything was okay and created PNG for instance, 
now under 4.3.0 the image files get malformed because of 
two warnings which are preceding the non-working data: 
Warning: imagettfbbox() [...]: arialbd.ttf in /home/... on 
line xx 
Warning: imagettftext() [...]: ..# in /home/... on line yy 
Both are shortened inside the brackets and by the omitted 
scriptname. The rest is as short as produced ... 
What I'm calling is: 
$font = "arialbd.ttf"; 
$text = "whatever"; 
$size = imagettfbbox( 10, 0, $font, $text ); 
imagettftext( $imgobj, 10, 0, 0, $height, $col, $font, 
arialbd.ttf lies in same directory as script does. 
Preceding both calls with @ lead to Apache/PHP not 
answering anymore ... (faking some request with telnet 
results in an unstoppable telnet client). 
I compiled from source without any source patch or similar 
with following configuration: 
'./configure' '--with-apxs2' '--enable-discard-path' 
'--with-debug' '--enable-safe-mode' '--with-exec-dir' 
'--with-openssl' '--enable-sigchild' 
'--enable-maqic-quotes' '--enable-libgcc' '--with-zlib' 
'--enable-bcmath' '--with-bz2' '--enable-calendar' 
'--with-db3' '--enable-dio' '--enable-ftp' '--with-gd' 
'--enable-gd-native-ttf' '--enable-dl' 
'--with-ming=/tmp/ming-0.2a/' '--with-ttf' '--with-t1lib' 
'--with-jpeg-dir' '--with-png-dir' '--with-gettext' 
'--with-imap' '--with-imap-ssl' '--enable-mbstring' 
'--enable-mbregex' '--with-mcrypt' '--with-mysql=/usr' 
'--with-pdflib' '--with-tiff-dir' '--enable-sockets' 
'--with-regex=system' '--enable-tokenizer' '--with-xmlrpc' 
check my php-config under 
On closing this report I repeat not to change any of the 
circumstances which made the script working before under 
4.2.3, even configure as shown above staid the same ... 
Thank you for your help! 
Thomas Urban 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-05 18:47 UTC]
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
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 29 05:01:24 2023 UTC