Lỗi constant wp_debug already defined in wp-config.php on line 97 năm 2024
This problem is caused by a Theme that added this WP code/constant: j’ai rencontré une erreur critique sur un site que je gère (https://blog.partiprof.fr). J’ai donc reçu un mail m’indiquant que le problème venait de l’extension YoastSEO et avec un lien permettant de se connecter en mode sans échec. Cela m’a permis de désactiver l’extension et de rendre le site à nouveau accessible. Toutefois j’ai maintenant 3 avertissements qui s’affichent pour tous les visiteurs :
Ces messages indiquent donc que les 3 constantes « WP-DEBUG », « WP_DEBUG_DISPLAY » et « WP_DEBUG_LOG » sont déjà définies. Mais je n’arrive pas à voir où. Dans le fichier wp-config.php indiqué par les messages, j’ai en fin de fichier :
Ce fichier appelle ensuite le fichier wp-settings.php, dans lequel on a pour la partie qui nous intéresse :
Et en allant chercher la fonction wp_initial_constants, qui se trouve dans le fichier « default-constants.php » de « wp-includes », j’ai :
J’ai essayé plusieurs choses :
Mais le problème reste toujours le même. Ces constantes sont apparemment définies ailleurs, mais je ne vois pas où. When configuring WPML in a multisite website, the website crashed in the last step and has been offline since then. In order to reactivate the many web pages of the multisite, I would like to know what I have to delete via FTP so that the website can be loaded again. Currently, I only have FTP access to the website. The browser gives the following error message: Gateway Timeout The gateway did not receive a timely response from the upstream server or application. The provider's web error log has returned this error message: 2023-07-07 17:32:20 2001:818:dcd2:6700:5492:bf71:570c:f869 proxy_fcgi:error 9585 (70007)The timeout specified has expired: AH01075: Error dispatching request to : (polling) 2023-07-07 17:29:52 185.196.220.26 core:error 11149 AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. 2023-07-07 17:29:52 185.196.220.26 core:error 11149 AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. The PHP log has these error messages: 2023-07-07 17:29:03 PHP Warning Constant WP_DEBUG already defined in /home/sites/site100019687/web/www.academicwebs.com/wp-config.php on line 95 2023-07-07 17:29:03 PHP Warning Constant WP_AUTO_UPDATE_CORE already defined in /home/sites/site100019687/web/www.academicwebs.com/wp-config.php on line 97 I would be very thankful, if you could help me fast with a solution, to re-activate the Multisite. Best, Jens jensH-30 I could resolve the issue by changing the PHP version from 8.1 to 8.2. Andreas W. Supporter Sprachen: Englisch (English ) Deutsch (Deutsch ) Zeitzone: America/Lima (GMT-05:00) Hello, Please also take note that according to the error, two constants were declared twice in wp-config.php. |