How to load dynamic modules after compiling PHP with source package php-5.4.9.tar.gz, no need to reconfigure php_php tutorial

Source: Internet
Author: User
Tags zts
First confirm: When we install PHP, we specify its installation directory:--PREFIX=/VAR/LIB/PHP5, and directory/home/guanli/php-5.4.9 is the path that we unzipped. Tar.gz, that is, the source code path.

For example, installing 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

Prompt error:
Configuring for:
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 the 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 execution, we 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 you do not specify the location of the configuration file when compiling PHP, the default php.ini should be placed under/var/lib/php5/lib to be loaded, as discussed elsewhere.

we find; Extension_dir = "./", cancel the previous comment and change to:

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

Add Extension Reference again

Extension = bcmath.so

To do this, restart the HTTPD service and verify through Phpinfo () that the Bcmath module has been successfully loaded.


http://www.bkjia.com/PHPjc/477896.html www.bkjia.com true http://www.bkjia.com/PHPjc/477896.html techarticle first confirm: When we install PHP, we specify its installation directory:--PREFIX=/VAR/LIB/PHP5, and directory/home/guanli/php-5.4.9 is our decompression. tar.gz after the path, that is, the source generation ...

  • 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.