linux系统下安装php的pcntl扩展
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
1.首先看下 phpize命令 所在的目录 (ps:我的目录/usr/bin/phpize)
如果没有找到的话 执行安装
yum install php_devel
安装完毕后。会生成phpize命令
2.去php.net下载相应版本的php源文件
咱们以php-5.4.45 为例吧,解压后,进入相应的模块下
cd php-5.4.45/ext/pcntl
#先执行phpize
/usr/bin/phpize ./configure --with-php-config=/usr/bin/php-config
#编译、安装
./configure
make && make install
3.编译完毕后会生成了一个 pcntl.so的文件。在php的model目录里
编辑/etc/php.ini,加入
extension=pcntl.so
4.重启apache
service httpd restart
5.测试是否安装成功
<?php
echo pcntl_fork();
?>
输出:23165(不一定是这个数,但一定是个数字)
注意:
使用:/usr/bin/phpize 可能出现下面错误提示
Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command
解决方法:
yum install php-devel




A beautiful web dashboard for Linux
最近提交(Master分支:5 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
所有评论(0)