Mac--PHP已经开启gd扩展验证码不显示
生活随笔
收集整理的这篇文章主要介绍了
Mac--PHP已经开启gd扩展验证码不显示
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
错误显示:Call to undefined function imagettftext()
原因:
mac系统中自带的php的gd库中,缺少对freetype的支持,导致图片无法显示。
解决:
1 下载freetype,安装即可
下载地址:https://download.savannah.gnu.org/releases/freetype/
下载完成后编译安装
make clean
./configure --with-static --with-shared
make & make install
2 安装一个新的版本的PHP
url -s http://php-osx.liip.ch/install.sh | bash -s 7.2可能会出警告提示:
Detected macOS Mojave 10.14. There are serious issues with it, due to the original apache not loading foreign libraries anymore. PHP within apache will most certainly not work anymore if you proceed! The cli version still will. See this issue at https://github.com/liip/php-osx/issues/249 for details and discussion **** Restart this script withcurl -s https://php-osx.liip.ch/install.sh | bash -s force 7.1 to really install it大概意思为apache没有加载,如果继续的话PHP将不会在工作,直接忽略 执行下面提示的命令
curl -s https://php-osx.liip.ch/install.sh | bash -s force 7.1或者可以通过brew的方式安装,参考下面链接
https://www.cnblogs.com/jingxiaoniu/p/11102255.html
以上就是这次的全部内容!
转载于:https://www.cnblogs.com/jingxiaoniu/p/11114661.html
总结
以上是生活随笔为你收集整理的Mac--PHP已经开启gd扩展验证码不显示的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 苹果iPad Pro VS 三星Tab
- 下一篇: Mac入门--安装PHP扩展redis,