Home > Backend Development > PHP Tutorial > PHP安装编译配置里的扩展

PHP安装编译配置里的扩展

WBOY
Release: 2016-06-20 12:32:08
Original
813 people have browsed it

分类:PHP 时间: 2014年12月17日

有些扩展是PHP安装包自带的,这种我们安装的时候忘记安装了,后期生产过程中我们又要加进去,这种情况怎么办呢?其实也很简单,和安装其他扩展原理办法一样。下面以pcntl模块为例。

1、进入php源码包里找到pcntl扩展目录

[root@php ~]# cd ./php-5.6.7/ext/pcntl/
Copy after login

2、用phpize生成配置文件

[root@php pcntl]# phpize [root@php pcntl]# ./configure
Copy after login

3、make && make install安装

[root@php no-debug-non-zts-20131226]# ls bcmath.so gd.so opcache.a pcntl.so calendar.so mcrypt.so opcache.so pdo_mysql.so curl.so memcache.so openssl.so posix.so
Copy after login

4、php.ini配置加载pcntl.so扩展

extension=/usr/local/lib/php/extensions/no-debug-non-zts-20131226/pcntl.so
Copy after login

5、重启php-fpm,浏览器查看phpinfo.

附: Linux下php安装mongodb扩展 、 Linux下php安装memcache扩展 、 Linux下php安装redis扩展

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template