WordPress.org

Ready to get started?Download WordPress

Forums

RunPHP not working for me... (7 posts)

  1. kappaluppa
    Member
    Posted 8 years ago #

    I've had RunPHP installed on all of my WP sites, but have never been able to use it.

    I unchecked: WordPress should correct invalidly nested XHTML automatically
    And have cheked eval()content in page
    Am using [ instead of <

    I'm trying to test it with:
    [?php echo ‘Test’; ?]

    But still doesn't work.

    Any ideas?

    Thanks

  2. Mark (podz)
    Support Maven
    Posted 8 years ago #

    /*
    Plugin Name: Run PHP
    Version: 0.2.2
    Plugin URI: http://mark.scottishclimbs.com/archives/2004/07/02/running-php-in-wordpress-posts/
    Description: Allows PHP to run in posts by using custom HTML style tags
    Author: Mark Somerville
    Author URI: http://mark.scottishclimbs.com/
    */

    That uses <phpcode> </phpcode> does it not ?

  3. kappaluppa
    Member
    Posted 8 years ago #

    The PHPExec plugin uses the <phpcode> tags.
    I tried that and it worked.
    So I went back and tried the other and it started working too.

    But not until after I made sure I had removed the php header, sidebar, footer and other tags that were being redundant. That was because I had originally used a page modified as a template rather than an include.

    Did I confuse everyone?

    Thanks!

  4. Bhoney
    Member
    Posted 8 years ago #

    Run PHP is a must have plugin... I love it!

    I am however wondering if it is still safe to use on 2.0 seeing that the user level things are different.

  5. jonabad
    Member
    Posted 8 years ago #

    Per the Plugin Compatability list,
    http://codex.wordpress.org/User:Matt/2.0_Plugin_Compatibility
    RunPHP doesn't work under WP2.0 but Exec-PHP does.

    If you're not running a lot of PHP inside of pages and want to upgrade now, you can just switch plugins.

  6. Truth
    Member
    Posted 8 years ago #

    I run PHP EXEC but it doesn't work on mine aft my upgrade..

    I tried using

    <phpcode>
    <?php
    echo "Current date and time: ";
    echo date("l dS of F Y h:i:s A");
    ?>
    </phpcode>

    but it doesn't work on mine, any idea?

  7. jonabad
    Member
    Posted 8 years ago #

    PHP EXEC is also known to not work. There was a change to the way that posts and pages are processed.

    The Exec-PHP and WP-Exec plugins do work. With your current code, Exec-PHP would be a drop-in replacement.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags