php.net |  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
Votes:4
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nicolaasuni at tiscali dot it
New email:
PHP Version: OS:

 

 [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)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] edink@php.net
Could you try the solution described in the last comment at: http://bugs.php.net/bug.php?id=17192

 [2002-06-09 22:19 UTC] admin at trevorj dot com
YOU ARE MY HERO

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

Derick
 [2002-06-11 04:49 UTC] nicolaasuni at tiscali dot it
I'm sorry but the solution described by edink@php.net 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] mfischer@php.net
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.

Strace: http://razor.bindview.com/tools/desc/strace_readme.html
 [2002-06-25 09:13 UTC] j_fondecave at ifrance dot com
On win2K + php 4.2.1 + jpgraph, i have :
DEFINE("TTF_DIR","/WINNT/fonts/");

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 j_fondecave@ifrance.com 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: Sat Aug 13 18:05:44 2022 UTC