背景:
系统自带的imap版本太低,系统不支持报错信息如下:
PHP Startup: imap: Unable to initialize module
一,下载对应的版本
wget http://mirror.centos.org/centos/7/sclo/x86_64/sclo/Packages/s/sclo-php73-php-imap-7.3.11-1.el7.x86_64.rpm
二,将包添加到yum
Install CentOS SCLo repository:
yum install centos-release-scl
三,安装扩展
Install sclo-php73-php-imap rpm package:
yum install sclo-php73-php-imap
四,复制镜像到php的扩展安装目录
[deploy@iZwz94g9wy3pfptt1hwbf9Z no-debug-non-zts-20180731]# pwd
/usr/local/php/lib/php/extensions/no-debug-non-zts-20180731
cp /opt/rh/rh-php73/root/usr/lib64/php/modules/imap.so ./
五,重启
systemctl restart php-fpm
六,安装成功
[deploy@iZwz94g9wy3pfptt1hwbf9Z ChinaMadeAdminBackend]# php -m | grep imap
imap
链接:https://centos.pkgs.org/7/centos-sclo-x86_64/sclo-php73-php-imap-7.3.11-1.el7.x86_64.rpm.html
网友评论