By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,887 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,887 IT Pros & Developers. It's quick & easy.

Call to undefined Call to undefined function: imagettftext()

P: n/a
Hi.

On PHP 4.3.10 on Linux I try to:
------
$im = imagecreate(400, 30);
$black = imagecolorallocate($im, 0, 0, 0);
imagettftext($image, 20, -3, 10, 20, $black, 'Arial.ttf', 'Test');
-------

But I get this error message:
--------
PHP Fatal error: Call to undefined function: imagettftext()
-----------

'Arial.ttf' is located in the same directory as my script. My phpinfo()
is:
--------------
'./configure' '--prefix=/usr/local/php'
'--with-apxs2=/usr/local/httpd/bin/apxs'
'--with-mysql=/usr/local/mysql' '--with-curl=/usr/local/include/curl'
'--with-gd=/usr/local/gd' '--with-zlib-dir=/usr/local/zlib'
'-with-jpeg-dir=/usr/local/jpeg-6b'
--------------

Any suggestion? Thx.

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
fr***********@europe.com wrote:
On PHP 4.3.10 on Linux I try to:
------
$im = imagecreate(400, 30);
$black = imagecolorallocate($im, 0, 0, 0);
imagettftext($image, 20, -3, 10, 20, $black, 'Arial.ttf', 'Test');
-------

But I get this error message:
--------
PHP Fatal error: Call to undefined function: imagettftext()
-----------

'Arial.ttf' is located in the same directory as my script. My
phpinfo() is:
--------------
'./configure' '--prefix=/usr/local/php'
'--with-apxs2=/usr/local/httpd/bin/apxs'
'--with-mysql=/usr/local/mysql' '--with-curl=/usr/local/include/curl'
'--with-gd=/usr/local/gd' '--with-zlib-dir=/usr/local/zlib'
'-with-jpeg-dir=/usr/local/jpeg-6b'
--------------

Any suggestion? Thx.


You need to compile the freetype library into php to be able to use that
function.

--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.