Support » Plugin: WP Cloudflare Super Page Cache » Strip response cookies causing error 500

  • Resolved Leandro

    (@leandroprz)


    Hi,

    I was having issues with some pages and I wanted to try the Strip response cookies option, but after enabling it I got error 500 on my website.

    Is there another way to make it work by adding some custom code somewhere or something like that?

    How can I test if there’s something else causing this issue? Maybe another plugin?

    Thanks

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

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi @leandroprz,
    Error 500 means an internal server error. So, there definitely be a server error log where you can see what’s causing the Fatal Error in the system. It is very unlikely it is our plugin as this option is being used in so many websites. But it is hard to say anything without looking at the server error log.
    Please check the server error log.

    The same problem occurred on my website, after updating the plugin!
    I opted to unpublish the plugin so that my site works again!

    Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi @markk26,
    Really sorry to hear that but without providing the error log from your server we cannot know what’s causing this. So, please share the error log.

    Sorry, this error was not an error related to your plugin! I contacted my server and they informed me that the error is with Woocommerce!

    Thread Starter Leandro

    (@leandroprz)

    @isaumya Sorry about the late reply.

    Here’s my log: https://pastebin.pl/view/bfa328a8

    What’s strange is that when I’m not using the cookies option enabled, I see very bad results in GTmetrix. After enabling the cookie option my site shows error 500, so I delete the lines that option adds in my .htaccess file in order to get it up again and after that GTmetrix is showing great results, even though the .htaccess file doesn’t have those lines of code.

    Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi @leandroprz,
    The log you have shared is not the server error log (a.k.a PHP Error Log) but the log that is created by the plugin. This is of no help to track down Error 500. Check your server error log there you will see FATAL ERROR logs which basically causes error 500.
    Please share that. There we can clearly see what’s causing the fatal error in which file at what line no.

    Plugin Contributor Saumya Majumder

    (@isaumya)

    Thank you @markk26 for confirming that. 🙂

    Thread Starter Leandro

    (@leandroprz)

    Ok, my hosting sent me this log, I think it is what you need: https://pastebin.pl/view/06c02122

    I don’t see any code 500 there, but I was definitely getting one as you can see here: https://i.imgur.com/bcqbkVL.png

    Here’s a previous log they also sent me: https://pastebin.pl/view/2855b7d6

    • This reply was modified 4 months, 2 weeks ago by Leandro.
    Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi @leandroprz,
    The logs you have shared is the Access Log not the PHP Error Log. Ask you host about PHP Error Log. That’s where you will find the details about the fatal error which caucuses ERROR 500/Internal Server Error.

    Access Log is not needed.

    Thread Starter Leandro

    (@leandroprz)

    I added these lines to my php.ini file:

    
    log_errors = true
    error_log = /home/myuser/logs/error.log
    display_startup_errors = false
    display_errors = false
    html_errors = false
    error_reporting = E_ALL
    log_errors_max_len = 0
    

    And this is the log I got: https://pastebin.pl/view/e5151eab
    But unfortunately I don’t see anything related to error 500. Maybe there’s something missing in my php.ini file?

    Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi @leandroprz,
    Try settting:

    display_startup_errors = true
    display_errors = true
    html_errors = true
    

    and see if you see the error you can also add:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    

    More info: https://codex.wordpress.org/WP_DEBUG

    in wp-config.php file and see if that log has any errors.

    Thread Starter Leandro

    (@leandroprz)

    I followed your instructions but unfortunately I don’t see anything different in the log: https://pastebin.pl/view/acbfe8a8

    Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi @leandroprz,
    This is so wired. I don’t see any errors or messages pointing to our plugin. But I see a lot of Jetpack related message. Can you try disabling that plugin and see if the issue goes away?

    Thread Starter Leandro

    (@leandroprz)

    I disabled Jetpack but that didn’t solve the issue. Here’s the log: https://pastebin.pl/view/d1c8487e

    These lines in the .htaccess are causing error 500 on my site:

    <IfModule mod_headers.c>
    Header unset Set-Cookie "expr=resp('x-wp-cf-super-cache-active') == '1'"
    Header always unset Set-Cookie "expr=resp('x-wp-cf-super-cache-active') == '1'"
    </IfModule>

    I mean, when they are not present the site works fine.

    Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi @leandroprz,
    Are you using Litespeed server if so what’s the LiteSpeed version?
    Also, have you checked this FAQ (if you are using LiteSpeed server): https://i.imgur.com/qZdynGj.png

Viewing 15 replies - 1 through 15 (of 20 total)
  • You must be logged in to reply to this topic.