• supriyos

    (@supriyos)


    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

    https://www.ads-software.com/extend/plugins/jetpack/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter supriyos

    (@supriyos)

    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

    (@fishsponge)

    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

    (@blackoutmikey)

    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.