问题:

Fatal
error: Call to undefined function Think\imagettftext() in /var/www/webreg/ThinkPHP/Library/Think/Verify.class.php on line 143

查看phpinfo()后得知,gd中没有freetype的支持

解决:

首先安装freestyle,php-gd

确保先安装freestyle,然后是php-gd;假设是先安装了php-gd,那么在安装完freestyle后。须要make clean。(这句非常重要,弄了非常多此,,,在这)

然后又一次配置编译參数例如以下:

1.到【你的php源代码解压文件夹】/ext/gd

make clean
./configure
--with-mysql
--prefix=/homewww/php
--with-apxs2=/homewww/httpd/bin/apxs
--with-config-file-path=/homewww/php/conf
--with-gd --enable-exif
--enable-gd-native-ttf
--enable-inline-optimization
--with-zlib --with-png-dir
--with-jpeg-dir=/usr/local/jpeg
--with-freetype-dir=/usr/local/lib
--with-ttf
--enable-mbstring
--with-gettext
--enable-gd-jis-conv
make && make install
2. 成功后提演示样例如以下,
Installing shared extensions: /homewww/php/lib/php/extensions/no-debug-zts-20100525/
这样新编译的gd.so会在此路径下。须要cp到你的php.ini中配置的extension_dir的文件夹下就可以。 3.以apache为例。重新启动 apache,service httpd restart
4.另外。也有可能是libjpeg libpng zlib这些引起。按提示安装后编译进去就可以。 这些依赖库包含freetype ,php-gd可通过yum install方式安装

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">

好久没记录东西了,希望能帮到后来遇到问题的朋友。。。

----------------附上完整php编译參数:------------------------------------------------------------------------------------------------------------------------------------------

./configure \
--prefix=/homewww/php \
--with-apxs2=/homewww/httpd/bin/apxs \
--with-config-file-path=/homewww/php/conf \
--with-mysql \
--with-mysqli \
--with-mysql-sock \
--enable-pdo \
--with-pdo-mysql \
--with-gd \
--with-iconv \
--with-zlib \
--enable-xml \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--enable-mbregex \
--enable-mbstring \
--enable-gd-native-ttf \
--with-openssl \
--enable-pcntl \
--enable-sockets \
--with-xmlrpc \
--enable-zip \
--enable-soap \
--without-pear \
--with-gettext \
--enable-session \
--with-jpeg-dir=/usr/local/jpeg \
--with-freetype-dir \
--with-png-dir=/usr/local/pngp \
--with-bz2 \

最新文章

  1. Java提高篇(三三)-----Map总结
  2. 微信开发那点事(No.001)
  3. Aptana STUDIO 3 使用(续)
  4. linux第12天 线程
  5. android,JNI创建进程,使用fork()
  6. 图解SQL的各种连接join[转]
  7. Windows Phone使用sliverlight toolkit实现页面切换动画效果
  8. 别人走的路--uap
  9. Netbeans 学习
  10. systemd学习
  11. 利用Hive分析nginx日志
  12. mysql 8.0 密码加密方式的坑
  13. crontab注意%
  14. DotNetCore学习-3.管道中间件
  15. sublime 格式化代码
  16. centos中进程管理工具
  17. 今天重装系统后,Windows更新提示“windows update当前无法检查更新,因为未运行服务。您可能需要重新启动计算机”
  18. U盘安装ubuntu 16.04 遇到 gfxboot.c32:not a COM32R image boot 的解决方法
  19. java-this和super的区别
  20. hdu 5079 Square

热门文章

  1. MySql免安装版绿化版安装配置,附MySQL服务无法启动解决方案
  2. .net开源CMS
  3. javaScript 原型与原型链学习笔记
  4. Linux下安装Go环境
  5. 转:mac环境下使用svn
  6. UVA 558 Wormholes 【SPFA 判负环】
  7. 9.Java通过axis调用WebService
  8. Entity Framework的原理及使用方式
  9. css3.0滚动条的优化
  10. HDU 4704 Sum 超大数幂取模