How to add PHP modules via Phpize

Source: Internet
Author: User
One, the benefits of Phpize

When are we going to use phpize? When we install 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 following parameters are the modules we want, but as the need for work, we have to add some modules, and do not want to recompile PHP, which we can use Phpize


1. Enter the PHP source directory

Below I take the zip installation as an example


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

PS: The code below can find the source PHP ext directory where, if you do not know the words

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    perform phpize./configure? With-php-config=/usr/local/php/bin/php-config make make    install

After the installation, there will be something like this.

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

Third, modify the php.ini

Vi/usr/local/php/lib/php.ini add a row to the loading module extension=zip.so

Four, 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.