Title: Issues with Multiple Instances
Last modified: August 26, 2020

---

# Issues with Multiple Instances

 *  [nerdjohn](https://wordpress.org/support/users/nerdjohn/)
 * (@nerdjohn)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/issues-with-multiple-instances/)
 * Need to execute two different php_everywhere code blocks.
 * Tried implementing the method in the documentation:
 * **[php_everywhere instance=1]
    [php_everywhere instance=2] . . . <?PHP if ($instance
   ==”1″) { … } else { … }
 * But this causes a WP fatal error on the page.
 * Wordpress v5.5, PHP v7.4

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

 *  [Flankerator](https://wordpress.org/support/users/flankerator/)
 * (@flankerator)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/issues-with-multiple-instances/#post-13314658)
 * This goes into the php everywhere code box:
 * <?php
 * if($instance==”1″)
    {…}
 * if($instance==”2″)
    {…} ?>
 * This goes into the page’s html:
 * [php_everywhere instance=1]
    [php_everywhere instance=2]
 * Works for me like that.
    Not sure about using “else” Make sure you close php 
   tag.
 *  Thread Starter [nerdjohn](https://wordpress.org/support/users/nerdjohn/)
 * (@nerdjohn)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/issues-with-multiple-instances/#post-13319158)
 * That’s the original construct I used… upon saving the WP page, it threw an error;
   every attempt to access that page resulted in WP crashing.
 * FYI, the IF statements in the php_everywhere box were simple INCLUDE statements.
 *  [Flankerator](https://wordpress.org/support/users/flankerator/)
 * (@flankerator)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/issues-with-multiple-instances/#post-13319254)
 * Would be better if you shared your code.
    When did you get the error? was it 
   working before?
 * A few possible pointers:
 * Check php 7.4 changelog and compare with your code. Maybe a legacy command is
   the culprit.
 * Check the console and see if there are any errors in there.
 * Try debugging by simplifying and running your code one chunk at a time and see
   at what stage it throws an error.
 *  Thread Starter [nerdjohn](https://wordpress.org/support/users/nerdjohn/)
 * (@nerdjohn)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/issues-with-multiple-instances/#post-13332818)
 * Here’s the error:
 * **Updating failed. The response is not a valid JSON response.**
 *  [Flankerator](https://wordpress.org/support/users/flankerator/)
 * (@flankerator)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/issues-with-multiple-instances/#post-13332980)
 * I suspect Gutenberg editor.
    Try switching back to classic editor.
 * I am using “Disable Gutenberg plugin”.

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

The topic ‘Issues with Multiple Instances’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/php-everywhere_5f7aae.svg)
 * [PHP Everywhere](https://wordpress.org/plugins/php-everywhere/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/php-everywhere/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/php-everywhere/)
 * [Active Topics](https://wordpress.org/support/plugin/php-everywhere/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/php-everywhere/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/php-everywhere/reviews/)

## Tags

 * [instances](https://wordpress.org/support/topic-tag/instances/)

 * 5 replies
 * 2 participants
 * Last reply from: [Flankerator](https://wordpress.org/support/users/flankerator/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/issues-with-multiple-instances/#post-13332980)
 * Status: not resolved