PHP Version 8.0 and 8.1
-
Hi,
Does WordPress Popular Posts work with PHP Versions 8.0 or 8.1?. I tryed and got an error during plugin activation.
Regards
A Jorge
-
Hi @freemason,
I haven’t tested the plugin with PHP 8 yet. What does the error message say exactly?
Hi,
I changed PHP to version 7.4 and activated the plugin without any problems. Then I changed back to 8.1 and have no error message anymore.
Will try to reverse all process and get back to you.
Regards
A JorgeHi,
I did everything again and the error is (my domain name replace by the word DOMAIN):
Plugin could not be activated because it triggered a fatal error. Fatal error: Uncaught mysqli_sql_exception: Table 'DOMAIN_aj.wpdc_popularpostsdata' doesn't exist in /home/DOMAIN/public_html/wp-includes/wp-db.php:2056 Stack trace: #0 /home/DOMAIN/public_html/wp-includes/wp-db.php(2056): mysqli_query() #1 /home/DOMAIN/public_html/wp-includes/wp-db.php(1945): wpdb->_do_query() #2 /home/DOMAIN/public_html/wp-includes/wp-db.php(2695): wpdb->query() #3 /home/DOMAIN/public_html/wp-admin/includes/upgrade.php(2749): wpdb->get_results() #4 /home/DOMAIN/public_html/wp-content/plugins/wordpress-popular-posts/src/Activation/Activator.php(132): dbDelta() #5 /home/DOMAIN/public_html/wp-content/plugins/wordpress-popular-posts/src/Activation/Activator.php(83): WordPressPopularPosts\Activation\Activator::do_db_tables() #6 /home/DOMAIN/public_html/wp-content/plugins/wordpress-popular-posts/src/Activation/Activator.php(52): WordPressPopularPosts\Activation\Activator::plugin_activate() #7 /home/DOMAIN/public_html/wp-includes/class-wp-hook.php(303): WordPressPopularPosts\Activation\Activator::activate() #8 /home/DOMAIN/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #9 /home/DOMAIN/public_html/wp-includes/plugin.php(470): WP_Hook->do_action() #10 /home/DOMAIN/public_html/wp-admin/plugins.php(193): do_action() #11 {main} thrown in /home/DOMAIN/public_html/wp-includes/wp-db.php on line 2056Looks like something prevented WPP from creating the
wpdc_popularpostsdatadatabase table but other than that the error doesn’t really say anything to me. I’ll have to test myself and see what I find.Alright so I tested WPP with PHP 8.0 and it works fine. I was able to activate the plugin normally on a clean WordPress install, no issues at all.
Now, PHP 8.1 is a no go. WordPress itself isn’t fully compatible with it at the moment (see PHP Compatibility and WordPress Versions and WordPress 5.9 and PHP 8.0-8.1). I got a few PHP notices and almost the same error message you got while installing WordPress with 8.1 (the only difference was that the message complained about a missing WordPress database table, the rest of the message was exactly the same).
For the time being and while the WordPress team continues to work on improving PHP 8.1 support you’ll want to stick to 7.4 or 8.0.
Hi,
thank you for your help. I’ll move back to PHP 8.0.
Regards
A Jorge
The topic ‘PHP Version 8.0 and 8.1’ is closed to new replies.