Title: Jetpack 2.0 error with Exec-PHP
Last modified: August 20, 2016

---

# Jetpack 2.0 error with Exec-PHP

 *  [supriyos](https://wordpress.org/support/users/supriyos/)
 * (@supriyos)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/jetpack-20-error-with-exec-php/)
 * I have been using Jetpack since 1.2 and love its direction. However, 2.0 (possibly
   1.9.x) gives me an error and I have had to deactivate the plugin.
 * I need to use PHP in my pages (articles). I have been using Exec-PHP (current
   version 4.9) for almost 2 years. In Jetpack 2.0, I am getting an error
 * **Fatal error: Cannot redeclare testfunction() (previously declared in /Library/
   WebServer/Documents/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’
   d code:6) in /Library/WebServer/Documents/wp-content/plugins/exec-php/includes/
   runtime.php(42) : eval()’d code on line 7**
 * which seems to point to Exec-PHP.
 * The page/article is a simple test page and contains
 *     ```
       <?php
       mb_internal_encoding("UTF-8");
       ini_set('display_errors', 1); 
   
       function testfunction(){ echo "Hi from testfunction";}
       testfunction();
   
       ?>
       ```
   
 * I have consistently got a similar error in all pages that have inline “function”
   statements.
 * I have had to deactivate Jetpack on my production site and need this problem 
   to be fixed soon.
 * Thanks
 * [http://wordpress.org/extend/plugins/jetpack/](http://wordpress.org/extend/plugins/jetpack/)

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

 *  Thread Starter [supriyos](https://wordpress.org/support/users/supriyos/)
 * (@supriyos)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/jetpack-20-error-with-exec-php/#post-3179332)
 * I have narrowed down which modules of Jetpack 2.0 seem to cause the problem by
   Deactivating some of the modules that were recently introduced.
 * When I deactivate the following modules, the **“Fatal error: Cannot redeclare
   testfunction() …”** no longer appears:
    **Publicize, Jetpack Comments, Sharing,
   Enhanced Distribution**
 * I hope this helps your developers to resolve the problem.
 *  [fishsponge](https://wordpress.org/support/users/fishsponge/)
 * (@fishsponge)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/jetpack-20-error-with-exec-php/#post-3179374)
 * Thank you so much for this! I updated to Jetpack 2.0 today and had exactly the
   same issue… the extra features are great, but it’s a shame we have to disable
   them!
 * If I declared a function using Exec-PHP in a page, I got this:
 * `Fatal error: Cannot redeclare time_since() (previously declared in /hsphere/
   local/home/username/rhobbs.co.uk/wp-content/plugins/exec-php/includes/runtime.
   php(42) : eval()'d code:76) in /hsphere/local/home/username/rhobbs.co.uk/wp-content/
   plugins/exec-php/includes/runtime.php(42) : eval()'d code on line 97`
 * If I then commented out the function declaration, the page came back but said
   it could not find the function I was trying to run.
 * Can someone re-write JetPack or Exec-PHP so they work happily together? 🙂
 *  [blackoutmikey](https://wordpress.org/support/users/blackoutmikey/)
 * (@blackoutmikey)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/jetpack-20-error-with-exec-php/#post-3179380)
 * Yes, someone do this. It’s a pain seeing as both of these plugins are widely 
   used and they’re well just epic.

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

The topic ‘Jetpack 2.0 error with Exec-PHP’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

## Tags

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

 * 3 replies
 * 3 participants
 * Last reply from: [blackoutmikey](https://wordpress.org/support/users/blackoutmikey/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/jetpack-20-error-with-exec-php/#post-3179380)
 * Status: not resolved