RHEL 7.4没有加载httpd的php扩展,也无法配置它

问题描述 投票:-1回答:1

我有一个安装了httpd web服务器和php作为CLI的新服务器。我可以在控制台中执行任何PHP脚本,但是当我将它放在一个文件中并在浏览器中调用它时,它会按原样输出PHP脚本。

基本上httpd不解析PHP脚本,因为mod_php之类的扩展或模块不可用。我在/etc/httpd/conf.modules.d中看不到任何扩展名为.so的文件

/etc/php.d is empty

/etc/httpd/conf.modules.d has
[root@ip-10-227-85-145 conf.modules.d]# ll
total 32
-rw-r--r-- 1 root root 3739 Jun 22  2018 00-base.conf
-rw-r--r-- 1 root root  139 Jun 22  2018 00-dav.conf
-rw-r--r-- 1 root root   41 Jun 22  2018 00-lua.conf
-rw-r--r-- 1 root root  742 Jun 22  2018 00-mpm.conf
-rw-r--r-- 1 root root  957 Jun 22  2018 00-proxy.conf
-rw-r--r-- 1 root root   88 Jun 22  2018 00-systemd.conf
-rw-r--r-- 1 root root  451 Jun 22  2018 01-cgi.conf
-rw-r--r-- 1 root root   59 Mar 31  2016 10-auth_openidc.conf

我无能为力。 yum install php5-mcrypt不工作。它给了我一些错误。

php linux apache httpd.conf rhel7
1个回答
0
投票

RHEL不支持mod_php。它使用fsm / fcgi - 这里提到 - https://aws.amazon.com/premiumsupport/knowledge-center/ec2-php56-apache-rhel72/

© www.soinside.com 2019 - 2024. All rights reserved.