从 PHP 升级 PHP 后,Apache 服务器已关闭
Apache Server is down after PHP upgrade from PHP
我已将 PHP 从 PHP 5.6 更新到 PHP 7.4。更新web服务器apache后,是宕机的。
错误是
"httpd: Syntax error on line 39 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.modules.d/php5.load: Cannot load modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory"
Line 39 on /etc/httpd/conf/httpd.conf: Include is like this "/etc/httpd/conf.modules.d/*.load"
Line 1 on /etc/httpd/conf.modules.d/php5.load is like this "LoadModule php5_module modules/libphp5.so"
服务器版本:Apache/2.4.6 (CentOS)
使用 a2dismod 命令禁用旧的 PHP 版本 & a2enmod 命令启用新版本。稍后,重新启动 apache 服务以加载更改。
a2dismod php5.6 // disables php5.6
a2enmod php7.4 // enables php7.4
sudo systemctl restart httpd.service // restart apache service
我已将 PHP 从 PHP 5.6 更新到 PHP 7.4。更新web服务器apache后,是宕机的。 错误是
"httpd: Syntax error on line 39 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.modules.d/php5.load: Cannot load modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory"
Line 39 on /etc/httpd/conf/httpd.conf: Include is like this "/etc/httpd/conf.modules.d/*.load"
Line 1 on /etc/httpd/conf.modules.d/php5.load is like this "LoadModule php5_module modules/libphp5.so"
服务器版本:Apache/2.4.6 (CentOS)
使用 a2dismod 命令禁用旧的 PHP 版本 & a2enmod 命令启用新版本。稍后,重新启动 apache 服务以加载更改。
a2dismod php5.6 // disables php5.6
a2enmod php7.4 // enables php7.4
sudo systemctl restart httpd.service // restart apache service