Forum Moderators: coopster
When I call this function, I receive the following:
Fatal error: Call to undefined function: imagettftext() in image.php on line #
I'm using PHP 4.3.3 with the built-in GD support, FreeType has been installed, and so has ZLib (everything the PHP manual says is needed to manipulate PNG images and TrueType fonts). I've tried several different configure options, and here's my latest:
./configure --with-mysql --enable-ftp --enable-sockets --with-gd --with-png-dir=/usr/local --with-zlib --with-zlib-dir=/usr/local --enable-gd-native-ttf --with-freetype-dir=/usr/local --with-apxs=/usr/local/apache/bin/apxs
I receive no errors during configure, make, or make install. I just receive the above-mentioned runtime error when trying to use the imagettftext functions. My searches for answers to this problem have only revealed other people asking the same question, but no one responding with answers.
Hope someone here knows :-).
[ca.php.net...]
The format of images you are able to manipulate depend on the version of GD you install, and any other libraries GD might need to access those image formats. Versions of GD older than gd-1.6 support GIF format images, and do not support PNG, where versions greater than gd-1.6 support PNG, not GIF.
./configure --with-mysql --enable-ftp --enable-sockets --with-gd --with-png --with-png-dir=/usr/local --with-jpeg --with-jpeg-dir=/usr/local --with-zlib --with-zlib-dir=/usr/local --enable-gd-native-ttf --enable-gd-imgstrttf --with-freetype --with-freetype-dir=/usr/local --with-ttf --with-apxs=/usr/local/apache/bin/apxs
Everything compiles fine.. no errors, just as before. But I receive the same error when attempting to use ImageTTFText.
I went ahead and reinstalled all of my software, including all of the libraries for all of the features that I wanted in PHP, and ImageTTFText worked just fine. As far as I can remember, I installed everything the same way, and each library is the same build as the old server.
So as an update.. everything's working fine on the new server, and that's all I really care about, but I don't know why it would work on one and not on the other :-).