Title: php8 compatibility
Last modified: June 13, 2022

---

# php8 compatibility

 *  Resolved [maryannk](https://wordpress.org/support/users/maryannkelley/)
 * (@maryannkelley)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/php8-compatibility-17/)
 * 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](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/php8-compatibility-17/#post-15734275)
 * 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](https://wordpress.org/support/users/maryannkelley/)
 * (@maryannkelley)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/php8-compatibility-17/#post-15736290)
 * 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](https://wordpress.org/support/users/maryannkelley/).
    -  This reply was modified 3 years, 12 months ago by [maryannk](https://wordpress.org/support/users/maryannkelley/).
 *  Thread Starter [maryannk](https://wordpress.org/support/users/maryannkelley/)
 * (@maryannkelley)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/php8-compatibility-17/#post-15736332)
 * 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](https://wordpress.org/support/users/maryannkelley/)
 * (@maryannkelley)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/php8-compatibility-17/#post-15736368)
 * 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.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [maryannk](https://wordpress.org/support/users/maryannkelley/)
 * Last activity: [3 years, 12 months ago](https://wordpress.org/support/topic/php8-compatibility-17/#post-15736368)
 * Status: resolved