Mark an article about how to install GD extension in PHP

Source: Internet
Author: User

Introduction: This is an extension of Mark's PHP installation GD.ArticleThe details page of PHP, related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 325736 'rolling = 'no'>
Mark an article about how to install GD extension in PHP

Source Address: http://www.heiok.com /? P = 517

Since PHP is compiled and installed by source code, the above two extensions are not installed. The process of adding these two extensions for PHP is as follows:

1. Install GD Extension

1. download and install the source code package required for the GD library extension (you can click the source code package to download it directly)

Gd-2.0.35.tar.gz http://www.libgd.org/releases/

Src.v8b.tar.gz http://www.ijg.org/

Libpng-1.5.0.tar.gz http://sourceforge.net/projects/libpng/

Freetype-2.4.4.tar.gz http://sourceforge.net/projects/freetype/

Zlib-1.2.3.tar.gz

2. Compile and install the source code packages respectively.

Install zlib

Tar zxvf zlib-1.2.3.tar.gz

CD zlib-1.2.3

./Configure

Make

Make install

Install libpng

Tar zxvf libpng-1.5.0.tar.tar

CD libpng-1.5.0

CD scripts

MV makefile. Linux ../makefile

CD ..

Make

Make install

Install FreeType

Tar zxvf freetype-2.4.4.tar.gz

CD freetype-2.4.4

./Configure

Make

Make install

Install JPEG

Tar zxvf jpegsrc.v8b.tar.gz

CD jpeg-8b

./Configure-enable-shared

Make

Make Test

Make install

Note: Configure must include the Enable-shared parameter. Otherwise, the shared library will not be generated.

Install the GD library

Tar zxvf gd-2.0.33.tar.gz

CD gd-2.0.33

./Configure with-PNG with-FreeType with-JPEG

Make install

3. Re-compile and install PHP (that is, add the above installation parameters after the PHP parameters previously compiled)

CD php-5.3.4 (go to the previous PHP source code directory)

. /Configure �� prefix =/opt/PHP �� with-mysql =/opt/MySQL �� with-apxs2 =/opt/Apache/bin/apxs �enable-track-vars �enable-force- CGI-redirect with-config-file-Path =/opt/PHP/etc. With-Gd-enable-Gd-native-TTF with-zlib with-PNG -JPEG with-FreeType �enable-sockets

The green font part is the parameter previously added when installing PHP.

Make

Make install

In this way, the GD library extension is installed. Restart Apache and check the PHP information test page to view the GD items;

"Mark an article about how to install GD extension in PHP"

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/325736.html pageno: 13.

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.