How to add a php module through phpize

Source: Internet
Author: User
How to add a php module through phpize I. Advantages of phpize

When should we use phpize? When installing php:

'./configure' '--prefix=/usr/local/php' '--with-mysql=/usr/local/mysql' '--with-zlib-dir' '--with-freetype-dir=/usr' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--with-gd' '--enable-ftp' '--with-iconv' '--with-gettext' '--with-curl' '--enable-fastcgi' '--with-openssl'

The parameters we follow are the modules we want. but as we need to work, we need to add some modules and don't want to re-compile php. we can use phpize for this.


1. go to the php source code directory.

The following is an example of zip installation.


cd /usr/local/php/include/php/ext/

Ps: The following code can be used to find the ext Directory of the source code php, provided that you do not know

 find  / -name ext-type d


Wget http://pecl.php.net/get/zip tar-zxvf zip cd zip-1.12.4 // usr/local/php/bin/phpize execute phpize./configure? With-php-config =/usr/local/php/bin/php-config make install

This will happen after installation.

See any operating system documentation about shared libraries formore information, such as the ld(1) and ld.so(8) manual pages.----------------------------------------------------------------------Build complete.Don't forget to run 'make test'.Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/

3. modify php. ini

Vi/usr/local/php/lib/php. ini add a line of extension = zip. so to the place where the module is loaded.

4. restart fpm

Php-fpm restart: kill-USR2 'cat/usr/local/php/var/run/php-fpm.pid'

Over

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.