Mac--PHP已经开启gd扩展验证码不显示
生活随笔
收集整理的這篇文章主要介紹了
Mac--PHP已经开启gd扩展验证码不显示
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
錯(cuò)誤顯示:Call to undefined function imagettftext()
原因:
mac系統(tǒng)中自帶的php的gd庫中,缺少對(duì)freetype的支持,導(dǎo)致圖片無法顯示。
解決:
1 下載freetype,安裝即可
下載地址:https://download.savannah.gnu.org/releases/freetype/
下載完成后編譯安裝
make clean
./configure --with-static --with-shared
make & make install
2 安裝一個(gè)新的版本的PHP
url -s http://php-osx.liip.ch/install.sh | bash -s 7.2?可能會(huì)出警告提示:
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沒有加載,如果繼續(xù)的話PHP將不會(huì)在工作,直接忽略 執(zhí)行下面提示的命令
curl -s https://php-osx.liip.ch/install.sh | bash -s force 7.1?或者可以通過brew的方式安裝,參考下面鏈接
https://www.cnblogs.com/jingxiaoniu/p/11102255.html?
以上就是這次的全部?jī)?nèi)容!
轉(zhuǎn)載于:https://www.cnblogs.com/jingxiaoniu/p/11114661.html
總結(jié)
以上是生活随笔為你收集整理的Mac--PHP已经开启gd扩展验证码不显示的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 苹果iPad Pro VS 三星Tab
- 下一篇: Mac入门--安装PHP扩展redis,