苏飞论坛
标题:
生成验证码时出现Fatal error: Call to undefined function imagettftext()
[打印本页]
作者:
yangying
时间:
2013-5-5 00:00
标题:
生成验证码时出现Fatal error: Call to undefined function imagettftext()
这是因为gd没有安装freetype库, 具体可按下面步骤安装:
1. 安装freetype-devel
[code=dos]yum install libXpm* freetype* libjpeg* libpng*[/code]
2.重新编译php
[code=dos]./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-gd --with-iconv --with-zlib --enable-xml --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-mcrypt --with-curl --with-jpeg-dir --with-freetype-dir
make
make clean
make install[/code]
重新加载php-fpm
[code=dos]service php-fpm reload[/code]
作者:
站长苏飞
时间:
2013-10-12 09:39
123456
欢迎光临 苏飞论坛 (http://www.sufeinet.com/)
Powered by Discuz! X3.4