php Call to undefined function imagettftext()问题解决
测试代码出现报错Call to undefined function imagettftext(),发现是gd库出现了问题
通过phpInfo()查看 gd库已经开启,但是里边没有freeType 和jpeg的支持 但有png的支持
估计是 freetype 跟 jpeg没有安装
于是安装这两软件
yum install freetype*
yum install libjpeg*
装完后 找一下库装到哪里去了
find / -name freetype
结果在 /usr/include/freetype2/ 文件夹中
同理 libjpeg 在 /usr/include 中
然后进入php源代码的 php源代码(下载的代码)/ext/gd文件夹中 利用phpize进行拓展安装
(我的php安装在/usr/local/php中)
/usr/local/php/bin/phpize
./configure --with-freetype-dir=/usr/include/freetype2 --with-jpeg-dir=/usr/include --with-php-config=/usr/local/php/bin/php-config
然后
make
make install
到此 完成了php中GD库到重新编译,重启后问题圆满解决
Ps:
执行phpize的时候出现报错提示
Cannot find config.m4. Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of the module
解决方法:
进入php源码包目录:cd /usr/local/php-5.6.25/ext/openssl
执行命令: cp ./config0.m4 ./config.m4 即可
php Call to undefined function imagettftext()问题解决的更多相关文章
- Mac下Call to undefined function imagettftext() 解决方案
文章转载至Mac下Call to undefined function imagettftext()终极解决方案 安装了一套onethink程序准备调试,结果在登录页面发现验证码无法显示,单独访问验证 ...
- Fatal error: Call to undefined function imagettftext()解决办法
Fatal error: Call to undefined function imagettftext()解决办法 我的问题是php编译安装时指定了gd的目录,其实不用指定.就可以了 博客分类: ...
- Call to undefined function imagettftext()解决方法
由 老高 发表于 2014-10-03 在 代码人生 分类 老高在一个新环境中装DEDECMS的时候发现后台验证码无法显示.直接搜索一下这个错误,有人说session错误,有的说权限错误等等,这不胡 ...
- 在已经编译安装好php7场景下,install gd库 with free-type (解决Call to undefined function imagettftext())
在已经编译安装好php7场景下,install gd库 with free-type (解决Call to undefined function imagettftext()) install g ...
- Mac php使用gd库出错 Call to undefined function imagettftext()
第一次在Mac下使用ThinkPHP,用到验证码功能时报如题的错误: Call to undefined function Think\imagettftext() 然后检查自己的GD库,发现安装上了 ...
- linux又一次编译安装gd,添加freetype支持,解决验证码不显示问题,Fatal error: Call to undefined function imagettftext()
问题: Fatal error: Call to undefined function Think\imagettftext() in /var/www/webreg/ThinkPHP/Library ...
- fatal error: call to undefined function imagettftext
参照:http://stackoverflow.com/questions/7290958/php-fatal-error-call-to-undefined-function-imagettftex ...
- 关于 CI框架访问数据库类提示Call to undefined function mysqli_init() 问题解决
我上次实践发现,安装在Win10 WampServer3.0.4集成环境,不仅打不开phpmyadmin会报错就算了,而且报错后又没提示那么解决,同时你打开php扩展配置发现,WampServer系统 ...
- php提示Fatal error: Call to undefined function imagecreate()
在php中imagecreate函数是一个图形处理函数,主要用于新建一个基于调色板的图像了,然后在这个基础上我们可以创建一些图形数字字符之类的,但这个函数需要GD库支持,如果没有开启GD库使用时会 / ...
随机推荐
- socket长连接理解
在一个tcp连接上可以连续发送多个数据包,在tcp连接保持期间,如果没有数据包发送,需要双方发检测包以维持此连接,一般需要自己做在线维持. 长连接指建立socket连接后不管是否使用都保持连接,但安全 ...
- python flask实现小项目方法
本文目的是为了完成一个项目用到的flask基本知识,例子会逐渐加深.最好对着源码,一步一步走. 下载源码,运行 pip install -r requirements.txt 建立环境 python ...
- Python 关联关系
class Boy: def __init__(self, name, girlFriend=None): # 在初始化的时候可以给一个对象的属性设置成另一个类的对象 self.girlFriend ...
- 【转载】 Pytorch(1) pytorch中的BN层的注意事项
原文地址: https://blog.csdn.net/weixin_40100431/article/details/84349470 ------------------------------- ...
- Android动态添加Device Admin权限
/********************************************************************** * Android动态添加Device Admin权限 ...
- Linux make menuconfig查找并快速跳转指定驱动选项
/********************************************************************** * Linux make menuconfig查找并快速 ...
- JS中数据类型的判断
typeof 使用 : var n = "hello"; console.log(typeof n); console.log(typeof(n));
- [LeetCode&Python] Problem 383. Ransom Note
Given an arbitrary ransom note string and another string containing letters from all the magazines, ...
- soft-nms
https://blog.csdn.net/app_12062011/article/details/77963494 ----> NMS-非极大值抑制进行后处理. 通常的做法是将检测框按得分排 ...
- difference among String,StringBuilder,StringBuffer
difference among String,StringBuilder,StringBuffer String常用构造函数 String(byte[] bytes) String(byte[] b ...