I have an application which uses the ttf functions to write text over an image.
I have this application completely working 100% on my own server. I
then moved it over to my clients server. The problem is that it no
longer writes the text.
It doesn't give any errors, it just doesn't write the text.
nothing fails. The script runs without errors. NO errors in the apache
log, no errors anywhere.
IT's just that I get no text written.. Here is the relevant line of
the code that isn't working:
imagettftext($image, $size, $angle, $center_x, $y, $color, $font, $text);
(all of the variables above are filled with correct settings. Remember
like i said it worked fine on the other server, there is a
misconfiguration with the new server)
I know what the problem is. Free type isn't correctly installed with
GD and PHP. Problem is i don't know how to fix it.
I ran a "gdinfo()" and got the following:
Array
(
[GD Version] => bundled (2.0.28 compatible)
[FreeType Support] => 1
[FreeType Linkage] => with TTF library
[T1Lib Support] =>
[GIF Read Support] => 1
[GIF Create Support] => 1
[JPG Support] => 1
[PNG Support] => 1
[WBMP Support] => 1
[XPM Support] =>
[XBM Support] => 1
[JIS-mapped Japanese Font Support] =>
)
It shows the freetype support is on.
So what's wrong.. I have full root access to the server, so i can
recompile PHP however i need to. Here's what i've done so far:
locate freetype shows there is
/usr/include/freetype1
/usr/include/freetype2
i've run:
yum install freetype
yum install freetype-deve1
i've recompiled and rebuilt php as follows:
./configure '--with-apxs2' '--with-curl'
'--with-curl-dir=/usr/local/lib' '--with-gd'
'--with-gd-dir=/usr/local/lib' '--with-gettext'
'--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' '--enable-bcmath'
'--enable-calendar' '--enable-ftp' '--enable-magic-quotes'
'--enable-sockets' '--enable-track-vars' '--enable-mbstring'
'--enable-memory-limit' '--with-ttf' '--enable-gd-lzw-gif'
'--enable-mstring' '--enable-exif' '--enable-xslt'
'--with-xslt-sablot' '--with-gettext' '--enable-inline-optimization'
--enable-gd-native-ttf --with-freetype=/usr/include/freetype
Still same problem. Can someone please help me fix it |