adding PHP modules using phpize

Source: Internet
Author: User
Tags zts

One, the benefits of Phpize

When are we going to use phpize? When we install PHP:

./configure--prefix=/apps/product/php--with-config-file-path=/apps/product/php/etc--with-iconv-dir-- With-freetype-dir--with-png-dir--with-zlib--with-libxml-dir=/usr  

The parameters behind the root are the modules we want, but as we work, we need to add some modules and we don't want to recompile PHP, so we can use phpize.

Second, install the PHP module

Below I use the GD module installation as an example:

CD/APPS/PRODUCT/PHP-5.6.10/EXT/GD                #ext目录下面放的是php的模块库/apps/product/php5/bin/phpize# determine if the Php-config file exists, Call Php-config, and the. So file is automatically placed inside the Extension_dir./configure--ENABLE-GD--with-php-config=/apps/product/php5/bin/ Php-configmake && 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:     /app/product/php5/lib/php/extensions/no-debug-non-zts-20060613/

Third, view. So files, and modify PHP.ini

CD  /app/product/php5/lib/php/extensions/no-debug-non-zts-20060613/ls-al |grep gd-rwxr-xr-x 1 root  root   763334 Feb  9 10:51 gd.sovi  /app/product/php5/lib/php.ini Add a row to the loading module extension=gd.so

Four, re-start PHPF service

To view the compiled module:

/apps/product/php5/bin/php-i|grep configure/apps/product/php5/bin/php-m

  

adding PHP modules using phpize

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.