PHP installation mysqli, Curl_init, GD extensions

Source: Internet
Author: User
Tags curl install php zts

PHP installation mysqli, Curl_init, GD extensions


I. Installing the MYSQLI extension


Here to use the Phpize,phpize command is used to prepare the PHP Extension Library compilation environment, usually after you install PHP, will be installed in the bin directory of PHP to find this command.


The directory path of the following instructions, please users according to the actual situation of their system to make corresponding changes.


PHP Source Package folder under the Ext folder is the current version of the available extensions, CD in to see what you need? You should see the Mysqli folder.

# Cd/data/software/php-5.6.10/ext/mysqli

Executing phpize in the current directory

[[email protected] mysqli]#/usr/local/php/bin/phpize configuring for:php API Version:20131106zend Module API No: 20131226Zend Extension Api no:220131226[[email protected] mysqli]#./configure--prefix=/usr/local/mysqli--with-p Hp-config=/usr/local/php/bin/php-config--with-mysqli=/usr/local/mysql/bin/mysql_config[[email protected] mysqli] #make [[email protected] mysqli] #make Install


After the installation is complete, you will be prompted to expand the directory path, such as:


/usr/local/php/lib/php/extensions/no-debug-zts-20131226


The required mysqli.so will be in this directory, next modify the php.ini file under/usr/local/php/etc/, add the mysqli extension, that is, add the following line:


Extension=/usr/local/php/lib/php/extensions/no-debug-zts-20131226/mysqli.so


After restarting the Apache service, open the PHP information page again to see the mysqli entry.


Other PHP extensions are also similar to the installation ....



Two. Installing the Curl_init Extension


# cd/data/software/php-5.6.10/ext/curl#/usr/local/php/bin/phpize#/configure--with-php-config=/usr/local/php/ Bin/php-config--with-curl=dir# make# make install #直接输出如下信息, the file is already in the directory

Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-zts-20131226/


Next, modify the php.ini file under/usr/local/php/etc/, add the curl.so extension, and add the following line:


Extension=/usr/local/php/lib/php/extensions/no-debug-zts-20131226/curl.so


Restart related services


Three. Install GD extension


1. Download the relevant installation package:

jpegsrc.v9a.tar.gzhttp://www.ijg.org/


libpng-1.4.16.tar.gzhttp://sourceforge.net/projects/libpng/


freetype-2.6.tar.gzhttp://sourceforge.net/projects/freetype/



2. Compile and install each source package separately


Installing freetype-2.6.tar.gz

# TAR-ZXVF freetype-2.6.tar.gz # cd freetype-2.6/#./configure--prefix=/usr/local/freetype && make && ma Ke Install

Installing jpegsrc.v9a.tar.gz

# TAR-ZXVF jpegsrc.v9a.tar.gz# cd jpeg-9a/#./configure--prefix=/usr/local/jpeg && make && make install


Installing libpng-1.4.16.tar.gz

# TAR-ZXVF libpng-1.4.16.tar.gz # cd libpng-1.4.16#./configure--prefix=/usr/local/libpng# make && make install

No longer recompile PHP, or add a new extension with phpize

# cd/data/software/php-5.6.10/ext/gd/#/usr/local/php/bin/phpize#/configure--with-php-config=/usr/local/php/bin /php-config--with-jpeg-dir=/usr/local/jpeg--with-png-dir=/usr/local/libpng--with-freetype-dir=/usr/local/ FreeType


Then modify the php.ini file to add a row


Extension=/usr/local/php/lib/php/extensions/no-debug-zts-20131226/gd.so


Restart related services


This article is from the "Home_tang" blog, make sure to keep this source http://yagetang.blog.51cto.com/1780698/1696657

PHP installation mysqli, Curl_init, GD extensions

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.