45, PHP expansion module installation

Source: Internet
Author: User
Tags php error php error log

when you have installed and compiled PHP, but found that less than one module installed, you can use the extension module to compile.

View module:/usr/local/php/bin/php-m


Example to install a Redis module:

# CD/USR/LOCAL/SRC

# wget Https://codeload.github.com/phpredis/phpredis/zip/develop

# MV Develop Phpredis-develop.zip

# Unzip Phpredis-develop.zip

# CD phpredis-develop/

#/usr/local/php7/bin/phpize//In order to generate configure files

Configuring for:

PHP Api version:20160303

Zend Module Api no:20160303

Zend Extension Api no:320160303

Cannot find autoconf. Please check your autoconf installation and the first time the error says less autoconf this bag

$PHP _autoconf environment variable. Then, rerun the this script.

# yum Install-y autoconf

#/usr/local/php7/bin/phpize at this point, LS can see configure this file.

#./configure--with-php-config=/usr/local/php7/bin/php-config

In general, you just need to add this option.

# make

# make Install//will put redis.so files in this 20160303 directory

Installing Shared extensions:/usr/local/php7/lib/php/extensions/no-debug-zts-20160303/

At this point the Redis module has not yet been loaded and needs to be configured:

#/usr/local/php7/bin/php-i |grep extension_dir//View extension module to store the directory, you can customize the path in php.ini.

# Vim/usr/local/php7/etc/php.ini//Add a line of configuration, can be placed on the last line

Extension=redis.so

#/usr/local/php7/bin/php-m |grep Redis//already loaded

Redis

Usually the extension module is placed in this directory/usr/local/php7/lib/php/extensions/


# Cd/usr/local/src/php-7.1.6/ext

When you want to compile an extension module, if it comes with the source package in the EXT directory has the directory of this module, then you can directly into the directory of the module to compile it.

Enter the directory,

Then/usr/local/php7/bin/phpize

Add one more #./configure--with-php-config=/usr/local/php7/bin/php-config

Again # make && make install

Then go into the/usr/local/php7/etc/php.ini to add a line extension=zip.so configuration can be loaded out.


Extended

Apache Rewrite Tutorials http://coffeelet.blog.163.com/blog/static/13515745320115842755199/ http://www.cnblogs.com/top5/archive/2009/08/12/1544098.html

Apache Rewrite has a dead loop http://ask.apelearn.com/question/1043

PHP error log level reference http://ask.apelearn.com/question/6973

PHP Open Short tag http://ask.apelearn.com/question/120

PHP.ini Detailed http://legolas.blog.51cto.com/2682485/493917


45, PHP expansion module installation

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.