Web Hosting Talk







View Full Version : Call to undefined function: imagettftext()


azizny
11-14-2005, 01:44 PM
Hello people,

I have had a problem with this function when copying text to an image via a font.

Now at first I thought I did not have gd, which I did and updated it.

Then I thught ImageMagick would fix it, installed it and it didn't..

Then I found out that its freetype that I need, which I installed and configured php with:


--with-jpeg-dir=/usr/local/lib \
--with-kerberos \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xml \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-zip \
--with-openssl \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars \
--enable-mbstring \
--enable-memory-limit \
//These 3 new lines I added
--enable-gd-native-ttf \
--with-ttf=/usr/include/freetype1 \
--with-freetype-dir=/usr/include/freetype2 \


Then i rebuilt php and restart httpd/server and it still wont work.

Yes, I also installed freetype 2 (thinking I didnt have freetype 1 in the first place).

I appreciate any help or guidance.

Peace,

azizny
11-14-2005, 04:08 PM
I see that all gd libries are in:

/usr/local/lib

is it because maybe it was combiled to:

--with-gd-dir=/usr/local

it wasnt good?

that was the defaaut value!

Peace,

Burhan
11-15-2005, 02:40 AM
what does phpinfo(); tell you regarding the compiled in libraries?

azizny
11-15-2005, 07:29 AM
what does phpinfo(); tell you regarding the compiled in libraries?

GD Support enabled
GD Version bundled (2.0.28 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

When I combile php, it says:

freetype2 support = 0, which means it doesnt find freetype2 ..

I dont see freetype 1 either?

Peace,