PHP8.1 RankMath – There has been a critical error on this website

#332779
  • Resolved chathu
    Rank Math free

    Hi,

    I use the RankMath SEO plugin for more than 8 months. Today I have updated my site to PHP v8.1 from PHP 7.4. After the update my site experience “There has been a critical error on this website. Please check your site admin email inbox for instructions.”

    Then I disabled the Nginx FastCGI cache for this site, not fixed.

    After that, I disabled all the plugins and activated them one by one. Finally, I found that after activating “Rank Math”, my site experienced that critical error.

    Then I deleted and installed the rank math plugin, but again face the same issue. Finally, I deactivated all the plugins and try to activate only the “Rank Maths”, but no success, same issue.

    How do I fix this issue?

    I have Ubuntu 20.04, Nginx 1.21.6, PHP 8.1 ( Zend Engine v4.1.2 & Zend OPcache v8.1.2).

Viewing 12 replies - 1 through 12 (of 12 total)
  • chathu
    Rank Math free

    PHP error logs,

    I use Mythemeshop premium theme “Designer“.

    thrown in /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php on line 490
    [27-Jan-2022 03:38:59 UTC] PHP Fatal error: Uncaught Error: Call to undefined method MyThemeShop\Helpers\Arr::from_string() in /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php:490
    Stack trace:
    #0 /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php(344): RankMath\Replace_Variables\Post_Variables->get_post_content()
    #1 /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php(60): RankMath\Replace_Variables\Post_Variables->get_excerpt()
    #2 /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-manager.php(175): RankMath\Replace_Variables\Post_Variables->setup_post_variables()
    #3 /var/www/domain.com/htdocs/wp-includes/class-wp-hook.php(307): RankMath\Replace_Variables\Manager->setup()
    #4 /var/www/domain.com/htdocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #5 /var/www/domain.com/htdocs/wp-includes/plugin.php(474): WP_Hook->do_action()
    #6 /var/www/domain.com/htdocs/wp-admin/admin-header.php(118): do_action()
    #7 /var/www/domain.com/htdocs/wp-admin/plugins.php(605): require_once(‘…’)
    #8 {main}
    thrown in /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php on line 490
    [27-Jan-2022 03:43:05 UTC] PHP Warning: Undefined property: stdClass::$version in /var/www/domain.com/htdocs/wp-admin/includes/plugin-install.php on line 481
    [27-Jan-2022 03:43:05 UTC] PHP Warning: Undefined property: stdClass::$version in /var/www/domain.com/htdocs/wp-admin/includes/plugin-install.php on line 483
    [27-Jan-2022 03:43:10 UTC] PHP Fatal error: Uncaught Error: Call to undefined method MyThemeShop\Helpers\Arr::from_string() in /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php:490
    Stack trace:
    #0 /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php(344): RankMath\Replace_Variables\Post_Variables->get_post_content()
    #1 /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php(60): RankMath\Replace_Variables\Post_Variables->get_excerpt()
    #2 /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-manager.php(175): RankMath\Replace_Variables\Post_Variables->setup_post_variables()
    #3 /var/www/domain.com/htdocs/wp-includes/class-wp-hook.php(307): RankMath\Replace_Variables\Manager->setup()
    #4 /var/www/domain.com/htdocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #5 /var/www/domain.com/htdocs/wp-includes/plugin.php(474): WP_Hook->do_action()
    #6 /var/www/domain.com/htdocs/wp-admin/admin-header.php(118): do_action()
    #7 /var/www/domain.com/htdocs/wp-admin/plugins.php(605): require_once(‘…’)
    #8 {main}
    thrown in /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php on line 490
    [27-Jan-2022 03:43:13 UTC] PHP Fatal error: Uncaught Error: Call to undefined method MyThemeShop\Helpers\Arr::from_string() in /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php:490
    Stack trace:
    #0 /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php(344): RankMath\Replace_Variables\Post_Variables->get_post_content()
    #1 /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php(60): RankMath\Replace_Variables\Post_Variables->get_excerpt()
    #2 /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-manager.php(175): RankMath\Replace_Variables\Post_Variables->setup_post_variables()
    #3 /var/www/domain.com/htdocs/wp-includes/class-wp-hook.php(307): RankMath\Replace_Variables\Manager->setup()
    #4 /var/www/domain.com/htdocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #5 /var/www/domain.com/htdocs/wp-includes/plugin.php(474): WP_Hook->do_action()
    #6 /var/www/domain.com/htdocs/wp-admin/admin-header.php(118): do_action()
    #7 /var/www/domain.com/htdocs/wp-admin/plugins.php(605): require_once(‘…’)
    #8 {main}
    thrown in /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php on line 490
    [27-Jan-2022 03:46:54 UTC] PHP Warning: Undefined property: stdClass::$plugins in /var/www/domain.com/htdocs/wp-content/plugins/error-log-monitor/freemius/includes/class-freemius.php on line 8552
    [27-Jan-2022 03:46:54 UTC] PHP Warning: foreach() argument must be of type array|object, null given in /var/www/domain.com/htdocs/wp-content/plugins/error-log-monitor/freemius/includes/class-freemius.php on line 8552
    [27-Jan-2022 03:46:54 UTC] PHP Warning: Undefined property: stdClass::$plugins in /var/www/domain.com/htdocs/wp-content/plugins/error-log-monitor/freemius/includes/fs-essential-functions.php on line 468
    [27-Jan-2022 03:46:54 UTC] PHP Warning: foreach() argument must be of type array|object, null given in /var/www/domain.com/htdocs/wp-content/plugins/error-log-monitor/freemius/includes/fs-essential-functions.php on line 468
    [27-Jan-2022 03:47:05 UTC] PHP Warning: Undefined property: stdClass::$version in /var/www/domain.com/htdocs/wp-admin/includes/plugin-install.php on line 481
    [27-Jan-2022 03:47:05 UTC] PHP Warning: Undefined property: stdClass::$version in /var/www/domain.com/htdocs/wp-admin/includes/plugin-install.php on line 483
    [27-Jan-2022 03:47:08 UTC] PHP Fatal error: Uncaught Error: Call to undefined method MyThemeShop\Helpers\Arr::from_string() in /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php:490
    Stack trace:
    #0 /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php(344): RankMath\Replace_Variables\Post_Variables->get_post_content()
    #1 /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php(60): RankMath\Replace_Variables\Post_Variables->get_excerpt()
    #2 /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-manager.php(175): RankMath\Replace_Variables\Post_Variables->setup_post_variables()
    #3 /var/www/domain.com/htdocs/wp-includes/class-wp-hook.php(307): RankMath\Replace_Variables\Manager->setup()
    #4 /var/www/domain.com/htdocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #5 /var/www/domain.com/htdocs/wp-includes/plugin.php(474): WP_Hook->do_action()
    #6 /var/www/domain.com/htdocs/wp-admin/admin-header.php(118): do_action()
    #7 /var/www/domain.com/htdocs/wp-admin/plugins.php(605): require_once(‘…’)
    #8 {main}
    thrown in /var/www/domain.com/htdocs/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php on line 490
    [27-Jan-2022 03:47:47 UTC] PHP Warning: Undefined variable $wp_version in /var/www/domain.com/htdocs/wp-content/plugins/nice-search/nice-search.php on line 26

    Hello,

    Thanks for contacting us and sorry for any inconvenience that might have been caused due to that.

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    chathu
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    i have also the same issue, as i am not able to activate Rank Math plugin because after activating its displaying the same critical error.

    Prabhat
    Rank Math agency

    Hello,

    I tried to login into your website’s admin area but the login page is not accessible. I tried to access the page using /wp-admin and /wp-login.php but 520 and 502 errors are returned. You can have a look at the screenshot in the sensitive data section of this ticket for a quick reference.

    Please verify the login page URL and the errors so that we can investigate further.

    Looking forward to helping you.

    Thank you.

    chathu
    Rank Math free

    Thank you for your reply. Yes, there is an issue with my server. Now I have fixed the Cloudflare error. Right now all sites are up. Could you please recheck?

    Hello,

    I was able to login into your WordPress admin dashboard.

    Since this is a fatal error, we would need to make sure that we are also able to access your FTP server so when a fatal error occurs while troubleshooting the site, we can revert it back to a working state.

    I tried accessing your FTP but I can’t seem to connect to your sever.

    Can you please check it so we can proceed with debugging the issue?

    chathu
    Rank Math free

    I try to set up an FTP server using proftpd, but it seems there is an issue connecting to the server. Is there any alternative method?

    chathu
    Rank Math free

    I have reconfigured the FTP server. Now you can log in to the FTP server. Could you please check you can access to FTP server?

    chathu
    Rank Math free

    I changed the theme to Genesis theme, then there is no issue. This problem arises when using the MyThemeShop Designer theme. Then I tested MyThemeShop Beacuity theme, no issue at all.

    chathu
    Rank Math free

    This issue fixed Designer theme 1.0.14.

    Anas
    Rank Math business

    Hello,

    We are glad the issue is resolved.

    If you have any questions in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 12 replies - 1 through 12 (of 12 total)

The ticket ‘PHP8.1 RankMath – There has been a critical error on this website’ is closed to new replies.