php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #39031 call to undefined function in imageftbbox()
Submitted: 2006-10-04 06:52 UTC Modified: 2006-10-05 16:22 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: vijijvs at yahoo dot co dot in Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Mandrake Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vijijvs at yahoo dot co dot in
New email:
PHP Version: OS:

 

 [2006-10-04 06:52 UTC] vijijvs at yahoo dot co dot in
Description:
------------
I get a fatal error:

Fatal error: Call to undefined function: imageftbbox()in php4.3.9 even though other image functions are working.

Reproduce code:
---------------
$fontSize = 5; 
$lineSpacing = 1;			
list($llx, $lly, $lrx, $lry, $urx, $ury, $ulx, $uly) = imageftbbox($fontSize, 0, $fontFileName, $text, array("linespacing" => $lineSpacing));
$textWidth = $lrx - $llx;
$textHeight = $lry - $ury; 
$angle = 0;

Actual result:
--------------
Fatal error: Call to undefined function: imageftbbox()

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-04 17:07 UTC] judas dot iscariote at gmail dot com
Your PHP is compiled against a GD version that doesn't support this.

what gdinfo says ?

<?php
var_dump(gd_info());
?>
 [2006-10-04 18:23 UTC] philip@php.net
According to the source (gd.c):

ifdef ENABLE_GD_TTF
	 PHP_FE(imagettfbbox, arginfo_imagettfbbox)
	 PHP_FE(imagettftext, arginfo_imagettftext)
#if HAVE_LIBFREETYPE && HAVE_GD_STRINGFTEX
	 PHP_FE(imageftbbox,								 arginfo_imageftbbox)
	 PHP_FE(imagefttext,								 arginfo_imagefttext)
#endif
#endif


Currently both imageftbbox() and imagefttext() have the undocumented status so essentially this bug report asks them to be documented. There are currently ~700* functions with the undocumented status but let's leave this one open anyways...

* http://doc.php.net/php/undoc_functions.php

 [2006-10-05 04:31 UTC] vijijvs at yahoo dot co dot in
Following is the information got for gdinfo:

array(10) { ["GD Version"]=>  string(13) "2.0 or higher" ["FreeType Support"]=>  bool(false) ["T1Lib Support"]=>  bool(false) ["GIF Read Support"]=>  bool(true) ["GIF Create Support"]=>  bool(true) ["JPG Support"]=>  bool(true) ["PNG Support"]=>  bool(true) ["WBMP Support"]=>  bool(true) ["XBM Support"]=>  bool(false) ["JIS-mapped Japanese Font Support"]=>  bool(false) }
 [2006-10-05 08:54 UTC] betz@php.net
imageftbbox, imagefttext requires freetype-support in gd.
your output from gd shows, that your gd is not compiled with freetype-support.
 [2006-10-05 16:22 UTC] betz@php.net
Still undocumented, but freetype requirement mentioned.

 [2020-02-07 06:11 UTC] phpdocbot@php.net
Automatic comment on behalf of betz
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=ddf338d9ae0e9b2543a998a27a8c11c7dc33616b
Log: fix #39031, funcs require freetype support
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 18:01:33 2025 UTC