• Resolved freemason

    (@freemason)


    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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @freemason,

    I haven’t tested the plugin with PHP 8 yet. What does the error message say exactly?

    Thread Starter freemason

    (@freemason)

    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 Jorge

    Thread Starter freemason

    (@freemason)

    Hi,

    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 2056
    Plugin Author Hector Cabrera

    (@hcabrera)

    Looks like something prevented WPP from creating the wpdc_popularpostsdata database 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.

    Plugin Author Hector Cabrera

    (@hcabrera)

    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.

    Thread Starter freemason

    (@freemason)

    Hi,

    thank you for your help. I’ll move back to PHP 8.0.

    Regards
    A Jorge

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP Version 8.0 and 8.1’ is closed to new replies.