-
Hello, RankMath plugin detected that I was using an NGINX server.
I was asked to add the following code:# START Nginx Rewrites for Rank Math Sitemaps
rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
# END Nginx Rewrites for Rank Math SitemapsI then asked assistance to my host who installed the code but that to create errors:
2020/06/12 16:17:42 [error] 23828#23828: *142390 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Call to undefined function is_cart() in (I hide my site address)/public/wp-content/plugins/seo-by-rank-math/includes/class-post.php:172
Stack trace:
#0 (I hide my site address)/public/wp-content/plugins/seo-by-rank-math/includes/frontend/paper/class-paper.php(525): RankMathPost::is_woocommerce_page()
#1 (I hide my site address)/public/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php(440): RankMathPaperPaper::should_apply_shortcode()
#2 (I hide my site address)/public/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php(305): RankMathReplace_VariablesPost_Variables->get_post_content(Object(stdClass))
#3 (I hide my site address)/public/wp-content/plugins/seo-by-rank-math/includes/replace-variables/class-post-variables.php(59): RankMathReplace_VariablesPost_Variables->get_excerpt()
#4 (I hide my site address)/” while reading response header from upstream, client: 174.118.220.229, server: fr.maximelesmotsducoeur.com, request: “GET / HTTP/1.0”, upstream: “fastcgi://unix:/var/run/php7.4-fpm-maximelesmotsducoeurfrance.sock:”, host: “fr.maximelesmotsducoeur.com”My interdmaire pointed out to me maybe a PHP version problem :
Your sites are using the latest stable version of PHP; but the error log I pasted indicates a scripting/coding issue with the plugin itself:
PHP Fatal error: Uncaught Error: Call to undefined function is_cart() in (I hide my site address)/public/wp-content/plugins/seo-by-rank-math/includes/class-post.php:172Thank you for your assistance, have a nice day
The ticket ‘FATAL ERROR with NGINX’ is closed to new replies.