Site Health crashes with v5.2.1

I have exactly the same stack trace as this poster back in July with v5.1.1: Site Heath crashes with Fail2ban

I’ve tried troubleshooting it but I guess that’s never going to help since it seems the error is to do with PHP versions? I’d prefer not to dive into the code to disable lines. Strange that it seems not very many people are being affected.

Here are the details from the troubleshooting email:
WordPress version 6.4.1

Active theme: Twenty Twenty-One (version 2.0)

Current plugin: WP fail2ban (version 5.2.1)

PHP version 8.1.26

Error Details

=============

An error of type E_ERROR was caused in line 470 of the file /home/carbonc/sites/wordpress/wp-content/plugins/wp-fail2ban/lib/site-health.php. Error message: Uncaught Error: Call to undefined function org\lecklider\charles\wordpress\wp_fail2ban\exec() in /home/carbonc/sites/wordpress/wp-content/plugins/wp-fail2ban/lib/site-health.php:470

Stack trace:

#0 /home/carbonc/sites/wordpress/wp-admin/includes/class-wp-site-health.php(194): org\lecklider\charles\wordpress\wp_fail2ban\SiteHealth->get_test_fail2ban_running()

#1 /home/carbonc/sites/wordpress/wp-admin/includes/class-wp-site-health.php(145): WP_Site_Health->perform_test()

#2 /home/carbonc/sites/wordpress/wp-includes/class-wp-hook.php(324): WP_Site_Health->enqueue_scripts()

#3 /home/carbonc/sites/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()

#4 /home/carbonc/sites/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()

#5 /home/carbonc/sites/wordpress/wp-admin/admin-header.php(118): do_action()

#6 /home/carbonc/sites/wordpress/wp-admin/site-health.php(96): require_once(‘…’)

#7 {main}

thrown

Just upgraded to WP 6.4.2 and still seeing the site health page error :frowning: Any news here?

**Fatal error** : Uncaught Error: Call to undefined function org\lecklider\charles\wordpress\wp_fail2ban\exec()
in **.../wp-content/plugins/wp-fail2ban/lib/site-health.php** on line **470**

Same error for me.

PHP-Version 8.0.30
MySQL-Version 8.0.35
Webserver nginx 1.18.0
WP 6.4.2
WP fail2ban 5.2.1

This is a regression from 5.1.x; it’s fixed in the upcoming 5.2.2 release.


The cause of the problem is the (IMO misnamed) disable_functions setting in php.ini which actually removes the functions listed, hence the need for additional function_exists() checks.

1 Like