客戶反映,他們的獨立主機上,有Discuz的圖形驗証碼出不來的錯誤。
我們一查php生成的error檔,看到的訊息是:
PHP Fatal error: Call to undefined function imagettftext()
看來是有少php的library。這個imagettftext()所對應的php library,是GD和freetype這兩個。所以解決之道就是:
- 執行cpanel的easyapache:WHM -> Software -> EasyApache
- If prompted to upgrade, do so then repeat the above step
- Begin customizing based on the current provile
- Proceed through the screens until you get to “Step 5”
- On “Step 5,” click on “Exhaustive Options”
- Under PHP, check the checkbox for GD, ttf
- Proceed with Build & Compile Process
一旦成功了,圖形驗証碼就出來了。