To install a PHP module using phpize

Source: Internet
Author: User
Tags soap openssl zts

Phpize is used to expand the PHP extension module, through the phpize can build PHP plug-in module

The following is an example of installing OpenSSL

Locate the Ext folder of the source package and find the OpenSSL directory when you enter it
Execute the following command:

The code is as follows Copy Code

CP CONFIG0.M4 CONFIG.M4
/usr/local/php5/bin/phpize
./configure–with-php-config=/usr/local/php5/bin/php-config
Make
Make install

The last is the editor/usr/local/php5/lib/php.ini (note: Here to verify the specific effective php.ini placed where?)

The code is as follows Copy Code

Extension_dir= "/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/"
Extension = "openssl.so"

Other edits are also so, after installing the external module, the check can be checked directly through the phpinfo or the command line.
The command line checks are as follows:

The code is as follows Copy Code

/usr/local/php5/bin/php-m

Look for, OpenSSL whether normal mount, if there is a problem, check the corresponding log file, according to the actual problem to do the corresponding treatment.


See also a SOAP installation for example

The code is as follows Copy Code

Cd/home/zhangy/php-5.2.6/ext/soap #ext目录下面放的是php的模块库
/usr/local/php/bin/phpize
#确定php-config file is not in, call Php-config, after installation. So file will be automatically placed in Extension_dir

./configure--enable-soap--with-php-config=/usr/local/php/bin/php-config
Make && make install

There's going to be something like that after the installation.

The code is as follows Copy Code

Operating system documentation about shared libraries for
More 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-20060613/

Third, view the. So file, and modify the php.ini

The code is as follows Copy Code

cd/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
Ls-al |grep Soap
-rwxr-xr-x 1 root root 763334 Feb 9 10:51 soap.so
Vi/usr/local/php/lib/php.ini

Add a row to the loading module extension=soap.so

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.