linux重新编译安装gd,增加freetype支持,解决验证码不显示问题,Fatal error: Call to undefined function imagettftext()
来源:互联网 发布:杭州大名软件怎么样 编辑:程序博客网 时间:2024/05/21 10:20
问题:
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-convmake && make install2. 成功后提示如下,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方式安装
好久没记录东西了,希望能帮到后来遇到问题的朋友。。。
----------------附上完整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 \
0 0
- linux重新编译安装gd,增加freetype支持,解决验证码不显示问题,Fatal error: Call to undefined function imagettftext()
- gd 添加freetype支持 。Call to undefined function Think\imagettftext() 错误解决
- thinkphp验证码显示不出来 Fatal error: Call to undefined function imagettftext() 生成验证码错误
- 解决 Fatal error: Call to undefined function imagettftext() 生成验证码错误
- Fatal error: Call to undefined function imagettftext()
- Fatal error: Call to undefined function imagettftext()
- 生成验证码时出现Fatal error: Call to undefined function imagettftext(),如何处理?
- 生成验证码时出现Fatal error: Call to undefined function imagettftext()
- thinkPHP 运行出现Fatal error: Call to undefined function Think\imagettftext()...问题
- 解决PHP问题:Fatal error: Call to undefined function: mysql_connect()
- 解决PHP问题:Fatal error: Call to undefined function: mysql_connect()
- Call to undefined function imagettftext()
- 解决PHP中的Fatal error: Call to undefined function curl_init()
- ubuntu下解决Fatal error: Call to undefined function curl_init()
- Fatal error:Call to undefined function curl_init()解决
- Fatal error: Call to undefined function curl_init() 报错解决
- Fatal error: Call to undefined function mysql_connect()
- Fatal error: Call to undefined function curl_init()
- 【整理】Python中:self和__init__的含义 + 为何要有self和__init__
- python 导入自定义包 包机制
- 黑马程序员—-C语言入门十重奏之六相濡以沫
- Swap Nodes in Pairs
- JQuery
- linux重新编译安装gd,增加freetype支持,解决验证码不显示问题,Fatal error: Call to undefined function imagettftext()
- Cookie/Session机制详解
- Hdu 1162 Eddy's picture【最小生成树】
- UVA 10369Arctic Network【最小生成树】
- leetcode#195-tenthline
- 多维数组的定义和存储
- QList类介绍
- Cocos2d-x移植到Android平台编译的两个文件Android.mk和Application.mk
- Oracle_dbms_shared_pool.purge 包的使用