[root@tencent ~]# yum install mod_php
Repository epel is listed more than once in the configuration
上次元数据过期检查:0:58:26 前,执行于 2020年02月17日 星期一 10时24分53秒。
软件包 php-7.3.5-3.module_el8.1.0+252+0d4e049c.x86_64 已安装。
依赖关系解决。
无需任何处理。
完毕!
[root@tencent conf.modules.d]# cat 15-php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
# Cannot load both php5 and php7 modules
<IfModule !mod_php5.c>
<IfModule prefork.c>
LoadModule php7_module modules/libphp7.so
</IfModule>
</IfModule>
[php7:crit] [pid 4549:tid 140039556180224] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.
AH00013: Pre-configuration failed
从上述内容中可以看出问题应该出在出在mpm模块上。
ls *mpm*
[root@tencent conf.modules.d]# ls *mpm*
00-mpm.conf
打开00-mpm.conf文件可以看到如下内容
cat 00-mpm.conf
[root@tencent conf.modules.d]# cat 00-mpm.conf
# Select the MPM module which should be used by uncommenting exactly
# one of the following LoadModule lines. See the httpd.conf(5) man
# page for more information on changing the MPM.
# prefork MPM: Implements a non-threaded, pre-forking web server
# See: http://httpd.apache.org/docs/2.4/mod/prefork.html
#
# NOTE: If enabling prefork, the httpd_graceful_shutdown SELinux
# boolean should be enabled, to allow graceful stop/shutdown.
#
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
# worker MPM: Multi-Processing Module implementing a hybrid
# multi-threaded multi-process web server
# See: http://httpd.apache.org/docs/2.4/mod/worker.html
#
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
# event MPM: A variant of the worker MPM with the goal of consuming
# threads only for connections with active processing
# See: http://httpd.apache.org/docs/2.4/mod/event.html
#
LoadModule mpm_event_module modules/mod_mpm_event.so