将下值由Off 变更为 Ondisplay_errors = Ondisplay_startup_errors = On
今天在用知更鸟主题更新小我私家网站的时候,,每次提交博文,直接报错HTTP 500,回到首页刷新后,博文已经提交上去了,分析nginx日志,没有什么报错,WordPress无法检察日志。
初阶判断,应该是PHP挪用这块呈现了问题,先把日志成果打开。
# 由于php.ini配置文件中错误显示封锁导致,将下值由Off 变换为 On display_errors = On display_startup_errors = On # 重启php处事 [[email protected] ~]# system restart php-fpm
从头提交,WordPress日志报错如下:
Warning: Invalid argument supplied for foreach() in /home/wwwroot/default/wp-includes/class-wp-theme.php on line 1148 Warning: scandir() has been disabled for security reasons in /home/wwwroot/default/wp-includes/class-wp-theme.php on line 1136
公然,提交的时候,挪用了php被禁用的函数,改削php.ini中的配置,删除红色部分,
disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server
# 再次重启php处事即可 [[email protected] ~]# system restart php-fpm
HTTP 500报错解决
温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/30672.html