Mac OS X comes with PHP Environment GD Library installation extension FreeType (call to undefined function imagettftext ())

Source: Internet
Author: User

When using thinkphp, the verification code does not display, there is an error: "Call to undefined function imagettftext ()", which is due to the lack of freetype extension in the PHP GD library;
The solution is as follows:

Download FreeType Extensions
: https://download.savannah.gnu.org/releases/freetype/
1, cd download package name

2, CD ext/Installation extension path

Compiling the installation

3,/configure--enable-static--enable-shared (no prefix specified,. h files are installed by default to/usr/local/include,. a|. So files are installed by default to/usr/local/lib)

4. Make && make install

5. Use function phpinfo () to see if the FreeType installation succeeded

6. Open php.ini Add extension to configuration file

Mac OS X comes with PHP Environment GD Library installation extension FreeType (call to undefined function imagettftext ())

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.