Call to undefined function imagettfbbox()

Eléphanteau du PHP | 40 Messages

18 janv. 2012, 20:31

J'obtiens le message d'erreur "Call to undefined function imagettfbbox()" depuis une migration de site sur un nouveau serveur.
J'ai recompilé PHP 5.2.17 avec les options qui semblaient manquer et le phpinfo semble indiquer ce qu'il faut:

Code : Tout sélectionner

'./configure' '--prefix=/opt/php52' '--enable-force-cgi-redirect' '--enable-fastcgi' '--with-regex=php' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-iconv' '--enable-exif' '--enable-ftp' '--with-gettext' '--enable-mbstring' '--with-pcre-regex' '--enable-shmop' '--enable-sockets' '--enable-wddx' '--with-libxml-dir=/usr' '--with-zlib' '--with-openssl=/usr' '--enable-soap' '--enable-zip' '--with-mhash=yes' '--with-gd' '--with-mysql' '--with-mysqli' '--with-pdo-mysql' '--with-pear' '--with-jpeg-dir=/usr/lib' '--with-freetype-dir=/lib64' '--with-ttf=/lib64' '--enable-gd-native-ttf'
Mais mon script affiche toujours la même erreur.

Eléphant du PHP | 209 Messages

19 janv. 2012, 10:53

Salut,

Quel format pour tes images générées ? Si c'est du PNG, il faut que tu ajoutes --with-png-dir ;)

http://www.php.net/manual/fr/image.installation.php

Eléphanteau du PHP | 40 Messages

19 janv. 2012, 12:44

Yep. It works now with that conf:

Code : Tout sélectionner

./configure \ --prefix=/opt/php52 \ --enable-force-cgi-redirect \ --enable-fastcgi \ --with-regex=php \ --enable-calendar \ --enable-sysvsem \ --enable-sysvshm \ --enable-sysvmsg \ --enable-bcmath \ --with-bz2 \ --enable-ctype \ --with-iconv \ --enable-exif \ --enable-ftp \ --with-gettext \ --enable-mbstring \ --with-pcre-regex \ --enable-shmop \ --enable-sockets \ --enable-wddx \ --with-libxml-dir=/usr \ --with-zlib \ --with-openssl=/usr \ --enable-soap \ --enable-zip \ --with-mhash=yes \ --with-gd \ --with-mysql \ --with-mysqli \ --with-pdo-mysql \ --with-pear \ --with-jpeg-dir=/usr/lib \ --with-png-dir \ --with-zlib-dir \ --with-xpm-dir \ --with-freetype-dir=/lib64 \ --with-ttf=/lib64 \ --enable-gd-native-ttf
Thanks a lot Shenryu