• Resolved maryannk

    (@maryannkelley)


    Looking through the forum, I see that Code Snippets should be compatible with php8, but my staging site gives a 500 error as soon as I switch from 7.4 to 8. I rolled it back and deactivated all of the snippets so that I could debug them, thinking it was one of my snippets causing the problem.

    Site still gives 500 error when I enable 8 with all snippets deactivated, so it’s definitely not the code in the snippets. As soon as I roll back to 7.4, site comes back up. I’m running version 3.1.1 on WP 5.9.3. Please advise what might be causing this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    I develop the plugin on PHP 8, so I would be surprised if this is due to an incompatibility in the core plugin, but I suppose we cannot completely rule it out.

    Are you able to enable error messages on your staging site and see what the error is that’s causing the 500 response?

    Thread Starter maryannk

    (@maryannkelley)

    I switched to default WP theme (2022), disabled all plugins except Code Snippets (with all snippets deactivated), turned on WP PHP error logging, and turned on logging for php8 in multiphp ini editor. There is nothing relevant in debug.log despite repeatedly hitting the site and getting 500 errors.

    I thought it might be hitting a server modsec rule, but I am seeing modsec rules for other domains coming up in the live apache log view, but nothing for the staging site domain.

    Any other suggestions?

    • This reply was modified 3 years, 12 months ago by maryannk.
    • This reply was modified 3 years, 12 months ago by maryannk.
    Thread Starter maryannk

    (@maryannkelley)

    The only potentially relevant entry I can come up with in the Apache log is a single access denied message with my IP hitting the staging site. I don’t want to post the entire entry here but would be happy to send it privately. The relevant message is:
    [msg “Atomicorp.com UNSUPPORTED DELAYED Rules: Possible Base64 Encoded PHP function in Argument – this may be an attack.”]

    Thread Starter maryannk

    (@maryannkelley)

    Well, I missed the obvious. Even with Code Snippets deactivated, the site gives a 500 error on php8, which is really weird with no plugins and the 2022 theme. I have a lot of investigating to do, but it isn’t due to the plugin. Thanks for being willing to look at it.

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

The topic ‘php8 compatibility’ is closed to new replies.