从 PHP 5.4 升级到 PHP 7.1 导致 403 错误

Upgrade from PHP 5.4 to PHP 7.1 caused 403 error

我最近从 PHP 版本 5.4 升级到 PHP 7.1,现在我的网站显示 403 错误,而以前它运行正常。

public_html 是 755

我的文件是 644

apache 版本为 2.4.6

将 .htaccess 重命名为 .htaccess.old

我重新启动了 apache 服务器

我不太确定如何解决此错误

根据 e_i_pi 的评论,我检查了 apache 错误日志,它显示

'/root/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that "/root/" is executable'

我将 root 权限更改为 751,它起作用了