PHP extension assembly-phpize

Source: Internet
Author: User
Phpize1.phpize introduction to PHP extension installation the phpize command is used to prepare the compiling environment for php extension installation. Used for manual compilation and installation of php extensions. Generally, pecl is used to install php extensions. If pecl cannot be installed, such as after the firewall, or the extension to be installed does not have a compatibility package in pecl. Use phpize to manually compile and install the SDK. Phpize is installed in the bin directory of php by default. View version $. bi PHP extension installation phpize
1. phpize introduction


The phpize command is used to prepare the php extension installation compiling environment. Used for manual compilation and installation of php extensions.

Generally, pecl is used to install php extensions.

If pecl cannot be installed, such as after the firewall, or the extension to be installed does not have a compatibility package in pecl. Use phpize to manually compile and install the SDK.


Phpize is installed in the bin directory of php by default.

View version

$ ./bin/phpize -vConfiguring for:PHP Api Version:         20100412Zend Module Api No:      20100525Zend Extension Api No:   220100525


2. phpize installation extension


For example, install the php extension of mongo.

Download and decompress:

 wget --no-check-certificate "https://github.com/mongodb/mongo-php-driver/archive/master.zip" unzip master cd mongo-php-driver-master
Run phpize

/home/gang/php/bin/phpize
Start Installation

 ./configure --with-php-config=/home/work/gang/php/php/bin/php-config make && make install

The mongo. so file is generated in the extentsion directory of php.

After the installation is successful, add "extension = mongo. so" to php. ini.


Then you can view it through bin/php-m. The mongo extension is included in the list.


Restart Apache or php-cgi.



From: http://blog.csdn.net/yonggang7/article/details/24103197



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.