Apache proxy_fcgi - 错误和 PHP 致命错误

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

我收到此错误(我附加日志)并且我的域返回 HTTP 500 错误,除非我在 wp-config 文件中启用 WP-debug,否则我没有更改任何内容,即使我禁用它,问题仍然存在,任何关于如何解决问题的想法?

谢谢

[Wed Jan 10 09:45:26.528761 2024] [proxy_fcgi:error] [pid 17529] [client 172.70.39.74:57228] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Undefined constant "\xe2\x80\x98WP_DEBUG\xe2\x80\x99" in /var/www/ricreo/wp-config.php:100\nStack trace:\n#0 /var/www/ricreo/wp-load.php(50): require_once()\n#1 /var/www/ricreo/wp-blog-header.php(13): require_once('...')\n#2 /var/www/ricreo/index.php(17): require('...')\n#3 {main}\n  thrown in /var/www/ricreo/wp-config.php on line 100'
[Wed Jan 10 09:45:52.566957 2024] [proxy_fcgi:error] [pid 15781] [client 172.70.135.68:20814] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Undefined constant "\xe2\x80\x98WP_DEBUG\xe2\x80\x99" in /var/www/ricreo/wp-config.php:100\nStack trace:\n#0 /var/www/ricreo/wp-load.php(50): require_once()\n#1 /var/www/ricreo/wp-blog-header.php(13): require_once('...')\n#2 /var/www/ricreo/index.php(17): require('...')\n#3 {main}\n  thrown in /var/www/ricreo/wp-config.php on line 100'
[Wed Jan 10 10:18:13.720701 2024] [proxy_fcgi:error] [pid 15780] [client 162.158.129.65:24538] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Undefined constant "\xe2\x80\x98WP_DEBUG\xe2\x80\x99" in /var/www/ricreo/wp-config.php:100\nStack trace:\n#0 /var/www/ricreo/wp-load.php(50): require_once()\n#1 /var/www/ricreo/wp-blog-header.php(13): require_once('...')\n#2 /var/www/ricreo/index.php(17): require('...')\n#3 {main}\n  thrown in /var/www/ricreo/wp-config.php on line 100'
[Wed Jan 10 10:18:22.645941 2024] [proxy_fcgi:error] [pid 16218] [client 172.71.147.141:47186] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Undefined constant "\xe2\x80\x98WP_DEBUG\xe2\x80\x99" in /var/www/ricreo/wp-config.php:100\nStack trace:\n#0 /var/www/ricreo/wp-load.php(50): require_once()\n#1 /var/www/ricreo/wp-blog-header.php(13): require_once('...')\n#2 /var/www/ricreo/index.php(17): require('...')\n#3 {main}\n  thrown in /var/www/ricreo/wp-config.php on line 100'
[Wed Jan 10 10:18:23.453478 2024] [proxy_fcgi:error] [pid 15781] [client 172.71.150.162:26612] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Undefined constant "\xe2\x80\x98WP_DEBUG\xe2\x80\x99" in /var/www/ricreo/wp-config.php:100\nStack trace:\n#0 /var/www/ricreo/wp-load.php(50): require_once()\n#1 /var/www/ricreo/wp-blog-header.php(13): require_once('...')\n#2 /var/www/ricreo/index.php(17): require('...')\n#3 {main}\n  thrown in /var/www/ricreo/wp-config.php on line 100'
[Wed Jan 10 10:18:34.435875 2024] [proxy_fcgi:error] [pid 15782] [client 162.158.129.64:43242] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Undefined constant "\xe2\x80\x98WP_DEBUG\xe2\x80\x99" in /var/www/ricreo/wp-config.php:100\nStack trace:\n#0 /var/www/ricreo/wp-load.php(50): require_once()\n#1 /var/www/ricreo/wp-admin/admin.php(34): require_once('...')\n#2 /var/www/ricreo/wp-admin/index.php(10): require_once('...')\n#3 {main}\n  thrown in /var/www/ricreo/wp-config.php on line 100'
[Wed Jan 10 10:20:10.847054 2024] [proxy_fcgi:error] [pid 17529] [client 34.76.96.55:40308] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Undefined constant "\xe2\x80\x98WP_DEBUG\xe2\x80\x99" in /var/www/ricreo/wp-config.php:100\nStack trace:\n#0 /var/www/ricreo/wp-load.php(50): require_once()\n#1 /var/www/ricreo/wp-blog-header.php(13): require_once('...')\n#2 /var/www/ricreo/index.php(17): require('...')\n#3 {main}\n  thrown in /var/www/ricreo/wp-config.php on line 100'
php wordpress lamp fastcgi
1个回答
0
投票

错误消息表明 WP_DEBUG 周围的引号不是标准的单引号或双引号。它们似乎是大引号,PHP 无法将其识别为字符串分隔符的有效语法。

将大引号(‘或’)替换为标准单引号 (') 或双引号 (")。

当文本编辑器将标准引号替换为大引号时,此错误是一个常见问题,特别是当您从网上某些没有标准代码格式的教程复制代码时。

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