After PHP is compiled and installed using the source code package php-5.4.9.tar.gz, you do not need to reconfigure the dynamic module.

Source: Internet
Author: User
Tags zts

First confirm: When we install PHP, specify its installation directory: -- prefix =/var/lib/php5; and directory/home/guanli/php-5.4.9 is the path after We decompress .tar.gz, that is, the source code path.

For example, install the bcmath module.

# Cd/home/guanli/php-5.4.9/ext

# Cd openssl

# Mv vonfig0.m4 config. m4

# Cd-

# Cd bcmath

#/Var/lib/php5/bin/phpize

An error is prompted:
Processing ing:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
Cannot find autoconf. Please check your autoconf installation and the $ PHP_AUTOCONF environment variable. Then, rerun this script.

# Yum install autoconf

#/Var/lib/php5/bin/phpize

#./Configure -- with-php-config =/var/lib/php5/bin/php-config

# Make

# Make test

# Make install

After the execution, the system will automatically prompt us to add the bcmath. so module to the path:/var/lib/php5/lib/php/extensions/no-debug-non-zts-20100525 below

Next, set the extension directory in php. ini:

If the location of the configuration file is not specified during PHP compilation, the default php. ini should be placed under/var/lib/php5/lib to be loaded. It has been mentioned elsewhere.

We found; extension_dir = "./", removed the preceding comment, and changed it:

Extension_dir = "/var/lib/php5/lib/php/extensions/no-debug-non-zts-20100525"

Add extension module reference again

Extension = bcmath. so

At this point, restart the httpd service and verify through phpinfo () that the bcmath module has been successfully loaded.

 


 

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.