Mark a php assembly gd expansion article

Source: Internet
Author: User
Mark a php installation gd expansion article source address: http://www.heiok.com /? P = 517 because PHP is compiled and installed by source code, the above two extensions are not installed. The following is the process of adding these two extensions for PHP: 1. install GD extension 1. download the source mark for installing the GD Library extension. a php installation gd extension article.
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;

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.