关于MAC下php出现:Call to undefined function Think\imagettftext()的解决办法
来源:互联网 发布:沈阳seo搜索优化软件 编辑:程序博客网 时间:2024/05/22 15:21
今天从网上下了一用thinkphp写的后台管理系统,安装好之后要登录发现验证码挂了,开启了thinkphp的调试模式,定位出错误是:
Call to undefined function Think\imagettftext()
错误位置
FILE: /Users/dimera/Sites/tpadmin/Libs/ThinkPHP/Library/Think/Verify.class.php LINE: 143
这个imagettftext()方法是在php的gd扩展中,因此先去php.ini 开启了gd扩展
用phpinfo探针定位到gd扩展:有了gd扩展还什么还是报错呢,原因是因为在gd扩展中还应该有个freeType,因此我们需要安装freeType,但是即使安装了freeType,还得重新编译php,考虑到有可能带来其他问题,发现stackoverflow的大神已经自己写好了一个sh来帮我们,一键搞定这个问题:
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5
原答案:http://stackoverflow.com/questions/26443242/after-upgrade-php-no-longer-supports-png-operations
PS:当遇到谷歌也解决不了的问题,一定是程序员错了,哈哈
1 3
- 关于MAC下php出现:Call to undefined function Think\imagettftext()的解决办法
- 关于MAC下php出现:Call to undefined function Think\imagettftext()的解决办法
- MAC下php出现:Call to undefined function Think\imagettftext()的解决办法
- mac THINKPHP Call to undefined function Think\imagettftext()
- thinkPHP 运行出现Fatal error: Call to undefined function Think\imagettftext()...问题
- thinkphp 报错:Call to undefined function think\captcha\imagettftext()
- Call to undefined function imagettftext()
- Fatal error: Call to undefined function imagettftext()
- Fatal error: Call to undefined function imagettftext()
- gd 添加freetype支持 。Call to undefined function Think\imagettftext() 错误解决
- PHP:Call to undefined function curl_init()解决办法
- php 提示Call to undefined function curl_init() 错误的解决办法
- php提示Call to undefined function curl_init() 错误的解决办法
- PHP error: Call to undefined function imagecreate()的解决办法
- PHP发生Call to undefined function imagecreate()错误的解决办法
- PHP发生Call to undefined function imagecreate()错误的解决办法
- PHP发生Call to undefined function imagecreate()错误的解决办法
- php运行出现Call to undefined function curl_init()的解决方法
- java批量删除redis中以某字符串前缀的key
- Linux下高性能网络编程中的几个TCP/IP选项
- redis-server python
- 第五周 项目三-时间类(1)
- BZOJ4403: 序列统计
- 关于MAC下php出现:Call to undefined function Think\imagettftext()的解决办法
- 静态类继承 父类引用子类的属性
- STM32系列第19篇--内部温度传感器
- 日志数据文件Json字段数据入库处理
- LeetCode之16----3Sums Closest
- Climbing Stairs
- 《MySQL必知必会学习笔记》:触发器
- 第七周实践项目-用多文件组织多个类的程序
- libevent带负载均衡的多线程使用示例