me too. I can’t get the simple <?php echo "hello"; ?> to execute either. It just simply shows the php like text. See http://www.ibookTravel.com.au
I am new to WP and I am not having any success inserting some php in a few posts and pages.
I have followed these steps:
1.Signed on as Administrator
2.Added and activated EXEC-Php and Deactivate Visual Editor plugins.
3.Created a new blank page
4.Disabled the Visual Editor on the new page: Custom Fields → deactivate_visual_editor = true
5.Disabled tag balancing in Settings → Write.
6.Assumed, as administrator I have “unfiltered html” capability, since I do not see how to activate this feature.
7.Assumed, as administrator I have “exec php” capability.
8.In the Editor (with no Visual or HTML tabs), type in:
<?php echo “This is the Exec-PHP ‘Hello World'”; ?>
The Preview shows:
<?php echo “This is the Exec-PHP ‘Hello World'”; ?>
I then modified …/plugins/exec-php/includes/runtime.php by inserting:
if(strpos($content,'< ?php ‘)!==FALSE)
{
$content=str_replace(‘< ?php’,'<?php’,$content);
}
..at the start of “function filter_user_content($content)” right after “global $post;”, as suggested above, with comments claiming miraculous results.
But, no miracle. The page preview still shows:
<?php echo “This is the Exec-PHP ‘Hello World'”; ?>
I have a feeling I am missing something obvious. Can someone point it out to me?
I had the same problem after resetting my user roles… this eliminated the permission for my id to write php code despite being admin. If this is happening, wordpress will be inserting <p> tags into your code and won’t render the PHP.
If you have somehow reset your user roles (ie permissions for user groups are definted in wp_user_roles) then try installing a backup. That database field should include something like
s:8:”exec_php”;b:1;s:15:”edit_others_php”;
If there is no reference to exec_php, that’s your problem.