登录php网页时报错,如下
Error: You have to install PHP mcrypt extension!
环境
php是以模块的方式安装到httpd中
[root@use01 ~]# hostnamectl
Static hostname: use01
Icon name: computer-vm
Chassis: vm
Machine ID: 01f864f07ad64060ab7ceef6f47e3a40
Boot ID: f57ff425ed86492ba1b2a9ad7ba330da
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-957.el7.x86_64
Architecture: x86-64
[root@use01 ~]# apachectl -v
Server version: Apache/2.4.6 (CentOS)
Server built: Apr 2 2020 13:13:23
[root@use01 ~]# rpm -q php
php-5.4.16-48.el7.x86_64
处理
开启mcrypt extension,如没有安装可安装 yum install php-mcrypt
/etc/php.ini
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
extension=php_mcrypt.so
重启httpd
[root@use01 ~]# systemctl restart httpd
补充
https://blog.csdn.net/Faker_LeeSangHyeok/article/details/77334080