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库使用时会 / ...
随机推荐
- 10.Python-第三方库requests详解(二)
Requests 是用Python语言编写,基于 urllib,采用 Apache2 Licensed 开源协议的 HTTP 库.它比 urllib 更加方便,可以节约我们大量的工作,完全满足 HTT ...
- aapt获取包名和activity,启动app
1.android sdk的环境安装好了之后,在build-tools\** 的目录下找到aapt.exe,将这个路径设置环境变量,添加到path下 2.在cmdl里面输入:aapt,出现以下内容就是 ...
- kbmMW授权管理解析(The kbmMW Authorization manager explained)
从kbmMW v.4.40开始,引入了一个新的非常灵活的授权管理器. 它的目的是为开发人员提供为用户定义资源权限的功能,这是一个可选功能,将现有的授权事件驱动方案内置到kbmMW中,使授权开发任务更容 ...
- django面试大全
1.Django请求的生命周期 a. wsgi, 创建socket服务端,用于接收用户请求并对请求进行初次封装. b. 中间件,对所有请求到来之前,响应之前定制一些操作. c. 路由匹配,在url和视 ...
- 判断input checkbox选中
$("#chexk").get(0).checked $("#chexk").is(':checked')
- JetBrains Goland 2018.2.1最新版破解
JetBrains GoLand 2018.2.1破解版是JetBrains的新商业IDE,旨在为Go开发提供符合人体工程学的环境.新的IDE通过特定于Go语言的编码辅助和工具集成扩展了Intelli ...
- Ubuntu16.04下通过tar.gz包安装MySQL5.5.52
1.下载 tar.gz包 : https://dev.mysql.com/downloads/mysql/ 2. // 安装依赖 sudo apt-get install libaio-dev // ...
- 17 多校1 Add More Zero 水题
Problem Description There is a youngster known for amateur propositions concerning several mathemati ...
- linux 安装crontab执行定时任务
转载:https://www.cnblogs.com/xiaoluo501395377/archive/2013/04/06/3002602.html http://yangqijun.iteye.c ...
- maven导出项目依赖的jar包
摘要: 在进行项目部署时,需要将maven项目所依赖的jar导出到指定目录,本文讲解如何导出项目依赖的jar包 一.导出到默认目录 targed/dependency 从Maven项目中导出项目依赖的 ...