How to open GD library support in PHP

Source: Internet
Author: User
How to open GD library support in PHP
Support for the PHP-enabled GD library under Linux
#开启GD库支持有以下几种方法
# #检测GD库是否安装命令
php5-m | Grep-i GD
Or
Php-i | Grep-i--color GD
# #如未安装GD库, install the server with the following method
# # # If the source is installed, then add parameters
--with-gd
# # # If it's a Debian Linux system, install it with Apt-get, as follows
Apt-get Install PHP5-GD
# # # If it's a centos system, install it with Yum, as follows
Yum Install PHP-GD
# # # If it's a SUSE Linux system, install with YaST, as follows
Yast-i PHP5_GD
# # # If the world is not enough egg pain, you can originally compiled PHP does not support the case of GD attached
First under Zlib source code, libpng source, GD source code
Unzip to source directory
Zlib Directory
./configure--prefix=/usr/local/zlib
make; Make install
Make clean
Libpng Directory
CP Scripts/makefile.linux./makefile
./configure--prefix=/usr/local/libpng
make; Make install
Make clean
GD Directory
./configure--PREFIX=/USR/LOCAL/LIBGD--with-png=/usr/local/libpng
make; Make install
Make clean
Finally in the php.ini, after searching [GD], add a line below
Extension=/usr/local/libgdgd.so
Then restart the PHP service, if not, try Reboot
Okay, but at the end of the note, to know the world a lot of unexpected, source installation, only add GD library in this case, the PHP version and the library version are different, so:
-There's no guarantee that it pays so much.
-No guarantee to successfully load gd.so
-Not guaranteed not to be pregnant
So if it is the source of the installation, it is best to compile PHP when adding parameters--WITH-GD
GD Library support for PHP open under Windows
Locate php.ini, open the content, find:
; Extension=php_gd2.dll
Put the front of the semicolon ";" Remove, and then save, if there is no semicolon, it is already open.

The above describes how to open the GD library support in PHP, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Related Article

    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.