Home >Backend Development >PHP Tutorial >Specific steps to install GD library in PHP5_PHP tutorial

Specific steps to install GD library in PHP5_PHP tutorial

WBOY
WBOYOriginal
2016-07-15 13:28:39812browse

Everyone should know something about the GD library. It is an important library for graphic and text operations in PHP. So today we will explain in detail how to install the GD library for PHP5 1. Download the libpng library, which needs to support at least one file type. If you need other types, download it separately

http://nchc.dl.sourceforge.net/project/libpng/00-libpng-stable/1.2.40/libpng-1.2.40.tar.gz

After decompressing, enter the folder

cd libpng-1.2.40

mv scripts/makefile.linux ./Makefile #Be sure to use the Makefile under script here, do not generate it through ./configure

make

make install

Install GD library for PHP5 2. Download the freetype library. Many GD functions require the support of this library

http://ftp.twaren.net/Unix/ NonGNU/freetype/freetype-2.3.5.tar.gz

3. After decompression

cd freetype-2.3.5

./configure --prefix=/usr/local/ freetype #Specify the installation directory of freetype here so that it can be used when compiling PHP. >Choose the appropriate version to download from http://www.libgd.org

Unzip and enter the directory

./configure --prefix=/usr/local/gd2 --with-png --with-freetype #There is no need to specify the freetype directory here,

, but you need to specify the installation path of the gd library

makemake install

PHP5 installs the GD library 5. Compile PHP

Enter the php source code directory

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --without-sqlite --

without- pdo-sqlite --with-gd=/usr/local/gd2 --with-freetype-dir=/usr/local/freetype/

make

make installRestart apache to complete PHP5 installs the GD library.

http://www.bkjia.com/PHPjc/446422.html

www.bkjia.com


true

http: //www.bkjia.com/PHPjc/446422.html

Everyone should know something about the GD library. It is an important library for PHP to perform image and text operations. So today we will explain in detail how to install the GD library in PHP5 1. Download the libpng library, at least...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn