• Resolved Megunticook

    (@megunticook)


    Recently upgraded my web server from PHP 7.4 to 8.1.2. Using W3TC v 2.2.12. I’m noting lots of similar errors in my NGINX log. Here’s an example:

    2023/01/31 09:12:17 [error] 554#554: *34 FastCGI sent in stderr: "PHP message: PHP Warning: preg_match(): Compilation failed: PCRE2 does not support \F, \L, \l, \N{name}, \U, or \u at offset 13 in /var/www/html/sico/wp-content/plugins/w3-total-cache/PgCache_ContentGrabber.php on line 967" while reading response header from upstream, client: 172.31.27.246, server: swansislandcompany.com, request: "GET /product-tag/top-down/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.1-fpm.sock:", host: "swansislandcompany.com"

    Any idea how to resolve this? Thank you.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @megunticook

    Thank you for reaching out and I am happy to assist you with this.

    Can you please share the screenshot or paste what you added to Performance>Page Cache>Advanced>Never cache the following pages: field?
    Thanks!

    Thread Starter Megunticook

    (@megunticook)

    Thanks for your quick response.

    Here’s what I’ve got in “Never cache the following pages” field:

    wp-.*\.php
    index\.php
    /yarndeal
    \wp-content\uploads\woo-product-feed-pro\xml*

    Should those backslashes be forward slashes instead?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @megunticook

    Thank you for your feedback.

    Yes you should use forward slash instead. Please replace this and use the correct path as it is on your server.

    Thanks!

    Thread Starter Megunticook

    (@megunticook)

    Thank you, fixed now. Here’s what I have for “Never cache the following pages”:

    wp-.*/.php
    index/.php
    /yarndeal
    /wp-content/uploads/woo-product-feed-pro/xml/*

    You see any other possible issues there?

    I noticed some backslashes in my “Non-trailing slash pages:” section:

    sitemap(_index)?\.xml(\.gz)?
    ([a-z0-9_\-]+)?sitemap\.xsl
    [a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?

    Is that correct or should I change those too?

    Really appreciate your help. Those errors showed up in my NGINX error log only after I upgraded PHP to 8.1.2 so I wasn’t even aware of the issue.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @megunticook

    Thank you for your feedback.

    The forward slash character is used to denote the boundaries of the regular expression: ? The backslash character ( \ ) is the escaping character. It can be used to denote an escaped character, a string, literal, or one of the set of supported special characters.

    So the exclusion of the URL needs to be with / and the backslashes in the Non-trailing slash pages are valid.

    Thanks!

    Thread Starter Megunticook

    (@megunticook)

    Got it, thanks! FYI I confirmed no more PHP errors in the NGINX log. Appreciate the help. “Case closed!”

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @megunticook

    You are most welcome!

    We would really appreciate it if you could take a minute and post a review here. This will help us to continue offering a top-notch product to users.
    Thanks!

    Thread Starter Megunticook

    (@megunticook)

    Done (5 stars and I mentioned the excellent support).

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

The topic ‘PHP error after upgrading to PHP 8.1’ is closed to new replies.