Title: Multiple PHP Instances
Last modified: August 22, 2016

---

# Multiple PHP Instances

 *  Resolved [Kevin4fm](https://wordpress.org/support/users/kevin4fm/)
 * (@kevin4fm)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/multiple-php-instances/)
 * Hi Alexander
 * I’m trying to find a replacement for another PHP plugin, which seems under some
   circumstances to be generating an error message. I’m using PHP extensively on
   a site I’m developing and have got used to just putting “<? php …. ?>” anywhere–
   in posts, pages, templates etc. I’ve got posts and templates which switch from
   html to php … then back … then back again, etc.
 * Is there a way of using multiple instances of the shortcode within the same post?
   Or is it necessary to put everything after the first PHP instance inside the 
   one shortcode wrapper? If the latter, what happens if there’s PHP in a template
   using the shortcode, then there’s another instance of the shortcode within the
   post the template is being applied to?
 * Or do I just need to try it, to find out? 🙂
 * Any info / guidance very gratefully received.
 * Best regards,
 * Kevin
 * [https://wordpress.org/plugins/php-everywhere/](https://wordpress.org/plugins/php-everywhere/)

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

 *  [ferguson4848](https://wordpress.org/support/users/ferguson4848/)
 * (@ferguson4848)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/multiple-php-instances/#post-5594803)
 * I’m wondering the same thing. Did you ever find an answer?
 *  Thread Starter [Kevin4fm](https://wordpress.org/support/users/kevin4fm/)
 * (@kevin4fm)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/multiple-php-instances/#post-5594804)
 * Unfortunately not. I’ve put off using the plugin I want to use, activation of
   which causes my current PHP plugin to generate an error message. So I haven’t
   really faced up to the problem yet.
 * Till now I’ve been using the plugin ‘PHP Code For Posts’. It allows me to switch
   almost seamlessly between HTML and PHP by just surrounding the PHP in standard‘
   <? PHP’ and ‘<? >’ tags – whether in templates, within actual posts or even widgets.
   It’s only one plugin (WP-Movies .. or some such name) which is highlighting an
   incorrect syntax error in the PHP plugin. Others haven’t before, and the sites
   I’ve been using it on are pretty heavy on plugin use. So if you haven’t tried
   that PHP plugin, it’s worth installing and trying it to see if you get an error
   with your particular group of plugins. If you don’t, great! It’s done everything
   I’ve needed it to till now. Unfortunately I don’t think it’s being actively supported/
   developed any more, so I can’t just fire the issue at the developer. 🙁
 * Hope this helps a little. 🙂
 * Best regards,
 * Kevin
 *  Thread Starter [Kevin4fm](https://wordpress.org/support/users/kevin4fm/)
 * (@kevin4fm)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/multiple-php-instances/#post-5594805)
 * I’ve just remembered, and thought I should add, that I ONLY get the error message
   on an offline development site I use, using a phantom XAMP server. I don’t get
   it on my live ‘online’ site. So if you do your developing online, it makes it
   even more likely that ‘PHP Code For Posts’ will solve your problems. 🙂
 *  Plugin Author [Alex](https://wordpress.org/support/users/alexander_fuchs/)
 * (@alexander_fuchs)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/multiple-php-instances/#post-5594809)
 * Hi, sorry for answering late. At the moment this plugin only supports one instance,
   but I am looking into implementing multiple shortcodes.
 *  Thread Starter [Kevin4fm](https://wordpress.org/support/users/kevin4fm/)
 * (@kevin4fm)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/multiple-php-instances/#post-5594810)
 * Many thanks for the response. I’ll await the outcome of your pondering with baited
   breath. 🙂
 * I’ve mentioned another plugin a couple of times above. Till now it has allowed
   me to just switch virtually seamlessly between PHP and HTML. (Doesn’t even need
   shortcodes … at least not conscious ones!) It MAY provide a ‘Eureka!’ moment,
   if you’re seeking inspiration. 🙂
 *  Plugin Author [Alex](https://wordpress.org/support/users/alexander_fuchs/)
 * (@alexander_fuchs)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/multiple-php-instances/#post-5594813)
 * I jsut updated the plugin with my own implementation

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

The topic ‘Multiple PHP 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

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

 * 6 replies
 * 3 participants
 * Last reply from: [Alex](https://wordpress.org/support/users/alexander_fuchs/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/multiple-php-instances/#post-5594813)
 * Status: resolved