How to install the GD Library in PHP5-PHP Tutorial

Source: Internet
Author: User
Install the GD Library in PHP5. You should have some knowledge about the GD Library, which is an important library for PHP graphic operations. So today we will explain how to install the GD Library in PHP5. 1. download the libpng Library. at least everyone should know about the GD Library. it is an important library for PHP graphic operations. So today we will explain how to proceed. Install the GD Library in PHP5. 1. download the libpng Library. you must support at least one file type. if you need other types, download the library separately.

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

After decompression, enter the folder

Cd libpng-1.2.40

Mv scripts/makefile. linux./Makefile # Make sure to use Makefile in script instead of using./configure

Generate

Make

Make install

Install the GD Library in 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. decompress the package.

Cd freetype-2.3.5

./Configure -- prefix =/usr/local/freetype # specify the installation directory of freetype for php compilation.

Make

Make install

Install the GD Library in PHP5 4. download the GD Library

Select the appropriate version download from the http://www.libgd.org

Decompress the package and enter the directory.

./Configure -- prefix =/usr/local/gd2 -- with-png -- with-freetype # The freetype directory is not required here,

However, the installation path of the gd library must be specified.

Make

Make install

Install the GD Library in PHP5 5. compile PHP

Go to 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 install

Restart apache to install the GD Library in PHP5.


Bytes. So today we will explain how to install the GD Library in PHP5. 1. download the libpng Library, at least...

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.