|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17261 imagettfbbox
Submitted: 2002-05-15 18:14 UTC Modified: 2002-08-13 05:15 UTC
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:3 (75.0%)
From: nicolaasuni at tiscali dot it Assigned:
Status: Closed Package: GD related
PHP Version: 4.2.1 OS: Windows XP Pro
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
46 - 32 = ?
Subscribe to this entry?

 [2002-05-15 18:14 UTC] nicolaasuni at tiscali dot it
the metod imagettfbbox return:
Could not find/open font...
using the php_gd2.dll
the same method work fine with php_gd.dll and with php_gd2.dll of the previous PHP release (4.2.0)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-07 06:27 UTC] chacal at chacalworld dot com
I have the same problem on linux plateform.
 [2002-06-09 11:58 UTC] admin at trevorj dot com
i am also having this problem on windows xp pro. ive had to revert to the old php_gd2.dll file
 [2002-06-09 20:03 UTC]
Could you try the solution described in the last comment at:

 [2002-06-09 22:19 UTC] admin at trevorj dot com

thank you soo much!
 [2002-06-10 06:00 UTC]
Edin is delclared HERO so we can close the bug :)

 [2002-06-11 04:49 UTC] nicolaasuni at tiscali dot it
I'm sorry but the solution described by do not work for me.
I've correctly set the GDFONTPATH enviromental variable but the problem persist.
I've tested this way using WXP Pro, PHP4.2.1., GD 1.8.x and GD 2.
The problem is always the same: Could not find/open font...
 [2002-06-11 05:08 UTC]
Try using strace and the php cgi binary to find where the problem. Make a simple script which calls imagettfbox (but one which doesn't output the image data) and then run it:

strace php-cgi -f yourscruipt.php

optionally, redirect the output to a file. search for the font name and you will see where gd tries to access it.

 [2002-06-25 09:13 UTC] j_fondecave at ifrance dot com
On win2K + php 4.2.1 + jpgraph, i have :

but the function : 
function File($fam,$style=FS_NORMAL)
has an incorrect test :
if( !file_exists($f) )

remove this test and the error message disappear.
 [2002-07-12 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2002-07-27 05:17 UTC] nicolaasuni at tiscali dot it
I've Just updated my system with PHP 4.2.2 and the problem persist.

I don't want create a personalized version of GD2 as suggested by because I'm trying to develop something that will work with GD2 "standard".

I hope that a corrected GD2 version will be released soon.
 [2002-08-13 05:15 UTC] nicolaasuni at tiscali dot it
Ok, now I've undestand how to solve this problem:
if you use GD2 you must specify:

putenv("GDFONTPATH=/path/to/font/"); //set GD library font path for GD2

also you have to call the font on function with only the name without extension and path (e.g.: 'arial')
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Aug 14 06:04:06 2022 UTC