Page 1 sur 1

Call to undefined function imagettfbbox()

Posté : 18 janv. 2012, 20:31
par kmchen
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.

Re: Call to undefined function imagettfbbox()

Posté : 19 janv. 2012, 10:53
par Shenryu
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

Re: Call to undefined function imagettfbbox()

Posté : 19 janv. 2012, 12:44
par kmchen
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