- php5-m | Grep-i GD
- Or
- Php-i | Grep-i--color GD
Copy Code2, if the GD library is not installed, the server installation, the method is as follows
- # If the source is installed, add the parameter
- --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 is a Linux system from SuSE, install it with YaST as follows
- Yast-i PHP5_GD
Copy Code3, can be compiled in the original PHP does not support the case of GD with the first zlib source code, libpng source, GD source code extracted to the source directory zlib directory
- ./configure--prefix=/usr/local/zlib
- make; Make install
- Make clean
Copy CodeLibpng 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
Copy CodeFinally in the php.ini, after searching [GD], add a line below
- Extension=/usr/local/libgdgd.so
Copy CodeThen restart the PHP service, if not, then try to reboot, there should be no problem. Problem Analysis: Source installation, only add GD library in this case, the PHP version and the version of the library are different, so:-not guaranteed to pay so much after the return-not guaranteed to successfully load gd.so-not guaranteed not pregnant therefore, if the source is installed, it is best to compile PHP with parameters--WITH-GD In addition, under windows open the PHP GD library support, the operation method is as follows: Find php.ini, open content, find:
- ; Extension=php_gd2.dll
Copy CodePut the front of the semicolon ";" Remove, and then save, if there is no semicolon, it is open. >>> Further reading: PHP GD library upload images and create thumbnails of code PHP GD library generated Verification code example PHP GD library Chinese garbled Solution PHP Verification code (GD Library Generation Verification Code) examples of PHP open Gd2 extension method introduction Linux under Installation PHP GD Support Library method PHP GD library Drawing Instance code of 24 hour histogram PHP GD library dynamic Generation Line chart Instance code PHP thumbnail generation class (support ImageMagick and GD library) |