Mac下Call to undefined function imagettftext() 解决方案

文章转载至Mac下Call to undefined function imagettftext()终极解决方案

安装了一套onethink程序准备调试,结果在登录页面发现验证码无法显示,单独访问验证码页面报错Call to undefined function imagettftext()。

使用搜索引擎查询了下,发现问题的关键是

gd未安装freetype,访问phpinfo.php文件发现

?

解决方案

缺点:不过phpinfo有植入广告哈

?

http://php-osx.liip.ch

curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5

curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6

curl -s http://php-osx.liip.ch/install.sh | bash -s 7.0

可以通过phpinfo函数查看本机的php版本号再选择替换不迟

终端执行可能会很慢呀,无需开启vpn直接使用自家的宽带就可以更新了,我用的还是移动宽带哈

freetype安装成功

?

系统信息

From :blog.sina.com.cn/s/blog_1380a6f6b0102w1pd.html

时间: 2024-08-04 00:50:04

Mac下Call to undefined function imagettftext() 解决方案的相关文章

php在linux下call to undefined function imagettftext()

imagettftext和imagefttext两个函数在生成验证码或需要向图片写入文字时候常用,在linux环境下只开启gd库是不够的. 这两个函数均需要 FreeType 库支持,在函数文档中也可以找到 所以当发现调用时报错提示函数不存在,都是因为编译时没有指定freetype库激活造成的.如果需要则必需重新编译gd库并激活freetype支持. freetype库是三方库,需要单独安装,如果系统中已经安装则无需安装 查看命令: rpm -ip freetype 或 whereis free

PHP Fatal error: Call to undefined function imagettftext()

PHP Fatal error: Call to undefined function imagettftext() 一.问题描述 安装了环境,发现验证码显示不了,查看日志:error: Call to undefined function imagettftext(),然后你去搜索百度,原因千千万,帖子里的解决方法也千千万,有的是缺gd库支持(没安装),也有可能是gd库要依赖的库等没有安装,或者说是库版本不匹配等,笔者我也捣弄了一大堆解决方式,最后的建议还是重新编译安装php,各种曲折大家可以

CLI命令模式下Call to undefined function mysql_connect()

背景: http访问一切正常,可以connect到数据库存取数据.但是当CLI模式时会出现Call to undefined function mysql_connect() 原因:CLI模式下 没有配置php.ini文件,或者配置了php.ini,但是php.ini里没有php_mysql.dll或mysql.so模块 解决: 1 首先执行 php -m检查 mysql模块是否加载 2 执行命令 php --ini 检查命令模式的配置文件路径以及配置文件是否存在 输出如下: Configura

Fatal error: Call to undefined function imagettftext()解决办法

Fatal error: Call to undefined function imagettftext()解决办法 我的问题是php编译安装时指定了gd的目录,其实不用指定.就可以了 博客分类: php freestylephpcmsconfigure  问题描述:phpcms 安装后,不能看到验证码图片. 解决:确保php-gd和freestyle.而且确保是先安装了freestyle,然后是php-gd:如果是先安装了php-gd,那么在安装完freestyle后,需要make clean

Mac php使用gd库出错 Call to undefined function imagettftext()

第一次在Mac下使用ThinkPHP,用到验证码功能时报如题的错误: Call to undefined function Think\imagettftext() 然后检查自己的GD库,发现安装上了的. 在网上找到解决方案: curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5 参考资料来源:http://blog.csdn.net/ayonel613/article/details/51136070

linux重新编译安装gd,增加freetype支持,解决验证码不显示问题,Fatal error: Call to undefined function imagettftext()

问题: 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后,需

Mac下无法安装Dragon Bones的解决方案

在Mac下安装dragon bones 然后很郁闷的发现 没有 Exchange Manger 然后就去官网下载了一个 不过下载以后发现 怎么都认不出我的Flash CC来 一安装zxp扩展就提示我没有Flasf 害的我又下载了好几个版本的Flash均不行 最后发现 原来是从官网上下载的ExchangeManger是CS6版本的,不过我的Flash 是CC 比 ExchangeManger要新  郁闷... https://www.adobe.com/exchange/em_download/i

fatal error: call to undefined function imagettftext

参照:http://stackoverflow.com/questions/7290958/php-fatal-error-call-to-undefined-function-imagettftext Just recompile extension gd.so, under folder php/ext/gd ./configure --with-php-config=/usr/local/php5/bin/php-config --with-freetype-dir=/usr/ --ena

php提示Fatal error: Call to undefined function imagecreate()

在php中imagecreate函数是一个图形处理函数,主要用于新建一个基于调色板的图像了,然后在这个基础上我们可以创建一些图形数字字符之类的,但这个函数需要GD库支持,如果没有开启GD库使用时会 undefined 在php中imagecreate函数是一个图形处理函数,主要用于新建一个基于调色板的图像了,然后在这个基础上我们可以创建一些图形数字字符之类的,但这个函数需要GD库支持,如果没有开启GD库使用时会提示Call to undefined function imagecreate()错