Wordpress PHP Execution Plugin

The PHP Execution Plugin is a Wordpress plugin which allows users to write php code inside of their posts and pages. Embedded php code will be executed when the post is shown. In doing so, the plugin offers the possibility to utilize dynamic content inside of posts.
Probably you might say, that there are already plugins that do the same!
So why another plugin that executes php code?
Well this plugin integrates well with Wordpress’ visual editor as the picture above shows. So in contrast to other plugins, you don’t need to turn off the visual editor in order to edit your php code.
Demonstration
With this plugin installed, you can insert php code into your post in html view and switch to visual view without losing or destroying the code:
This is how the php code above looks in the visual editor:
You can even drag and drop your code snippets around:
The executed php code inside the post will look like this:
Installation
This plugin is installed like any other Wordpress plugin:
- Download the latest version of the plugin.
- Unzip it into the
/wp-content/plugins/folder of your Wordpress installation resulting in a/wp-content/plugins/php_execution/folder. - Login as administrator and activate the plugin.
- Wordpress’ tag balancing has to be turned off. This is true by default. If you have enabled tag balancing, turn it off again by unchecking “WordPress should correct invalidly nested XHTML automatically” in Settings»Writing of the admin section.
- Optionally set PHP execution permissions in the Settings»PHP Execution panel. By default all administrators possess the permission to execute php code.
- As javascript code is added to the editor, you have to clear your browser cache !!! Otherwise the plugin won’t work as the code added by it simply won’t get executed. For information on how to clear the browser cache, follow this link.
For information on how to install Wordpress plugins in general follow this link.
Requirements
- WordPress 2.5 or higher
- PHP Execution is compatible with WordPress MU, as long as you install it in conjunction with another plugin called Unfiltered MU (http://wordpress.org/extend/plugins/unfiltered-mu/). See the comments below written by Ray for further information.
tested on WordPress 2.5, 2.6, 2.7 & 2.8 with IE 6 & 7, Firefox 3
Usage
Editing PHP
- php code can be edited in the html view of the editor.
- php code is embedded into a post in the same way as in any other html page: a php block begins with
<?phpand ends with?>. The short open tag, i.e.<?, is not supported. - One restriction is, that you are not allowed to use the ending delimeter (
?>) somewhere inside a string in your php code block. If you do so, this ending delimeter will be matched and your code will inevitably break apart. So don’t write e.g.:some text <?php $test = "hello ?>" ?> more text
Writing
$test = "hello ?>"instead will not lead to any problems. - Php code is not executed in the global scope. If you need to gain access to variables in the global scope you need to “import” them first with
global $var1, $var2;. - This plugin does not evaluate every single code snippet, but the content of the post as a whole. So the following lines won’t result in errors:
<?php if ($test==true) { ?> The test was successful. <?php } else { ?> The test failed. <?php } ?> - When switching between html and visual view the php code is not altered in any case. All html tags, whitespaces etc. in your code are preserved.
Admin Section: setting permissions for code execution
As executing php code is a sensitive task and possible exploitation should be prevented for security reasons, the PHP Execution Plugin provides an administration panel (Settings»PHP Execution) where you can grant or deny php execution permissions to certain Wordpress roles in general or set explicit permissions for specific users.
The plugin also automatically prevents users with no php execution rights from editing posts or pages of users with these rights. It thus fixes a possible security leak where people without php execution rights can still execute code with editing other users’ posts.
ToDos
- Internationalization
License
Download
php_execution.zip (version 1.0.1 – 2009/08/07)
browse the contents of php_execution.zip





89 Comments
I have installed this PHP Execution plugin but it’s not working. I have followed the instructions and gone over it several times and still nothing works. I tried it on 2 different WP blogs with the same results. I have tried to use your test code and that won’t even work.
The first site I tried it on only has a couple of basic plugins installed so I know it’s not a compatibility issue. it just won’t work. It does absolutely nothing.
The php code gets stripped out immediately just like it did before I installed your plugin. And yes I made sure to uncheck “WordPress should correct invalidly nested XHTML automatically”.
Is there something you can suggest to get it working?
Could you tell me, which version of WordPress you are using, because all php editing possibilities utterly depend on the javascript of WordPress’ text editor? Only WordPress since version 2.5 is supported.
I have checked the installation routine another time and detected that you need to clear your browser cache in order to make the plugin work. As the plugin adds javascript code to the editor and WordPress tries to cache javascript, the plugin’s javascript code only gets executed, when the cache was cleared.
I have added a few lines to the installation instructions above.
Top work…
Excellent, just gotta recomend this….
Marsha, I was having this problem, the path of the plug-in was not named php_execution (was php-execution-plugin) because I installed it through the Wordpress admin, not by the ftp. Renaming the path and clearing the browser cache again solved here. Great plug-in!
P.S. Sorry for the poor english writing, I’m brazilian!
Works like a charm, just exactly what I have been looking for! +1 for you bud
PS: sweet theme, inspired me to create something similar now…
Wordpress allows for the plugins directory to be moved from the default location (define( ‘WP_PLUGIN_DIR’…)). See wp-settings.php. In this case the PHP_EXECUTION_BASE_URL constant works incorrectly
It works. However, i can only use it in HTML mode. When I switch to Visual Editor mode it destroyed my php code.
I am using WP2.7.1.
Any idea? did I do anything wrong? though installation is very straight forward.
I was searching for the PHP execution plugin for quite a long time and I’m glad that I have found it. I have installed it and if any problems I would ask for help. Thanks a lot for this plugin.
Same as Manet here, works in HTML mode but when i switch to Visual the code desappears. Using 2.7.1 just like him. : (
Solved. Same as Efox, renamed the folder to php_execution. Was renamed to php-execution and not _. You should name it correcly in the official ZIP. Congrats for the great work ! Cya
I am trying to add kaizentrack Tracking JS code.
trackCampaign(20);
When I enter the code in editor I should enter in html view?? I can’t add via visual as code shows up on live page.
and I need to clear cache on each page prior to inserting code?
Am I right?
Code disappeared i will try again
trackCampaign(20);
Thanks for this great plugin.
Works like champ.
Tony
The best way to add javascript using this plugin (at least until it has a javascript sister) would be to echo it using PHP.
Is a search engine going to see the resulting output as a java script (unreadable) or as php output (readable)? I cant figure that from the description… Thanks!
[...] PHP plugin I discovered rocks – I tweeted about it a couple of weeks [...]
Hi Nicolas,
For your variable, “‘PHP_EXECUTION_BASE_URL”, please use the variable WP_CONTENT_URL or WP_PLUGIN_URL instead of a hard-coded “wp-content” to get the correct plugin path.
The reason I bring this up is because I am using a custom ‘wp-content’ directory.
Thanks for reading,
-Ray
One other thing,
I downloaded your plugin from the Wordpress Plugin repository and the PHP_EXECUTION_BASE_URL is incorrect.
Instead of “php-execution-plugin” as the directory name, your php script has “php_execution” as the directory name.
Just a heads up!
Hello Ray,
i have fixed the two bugs you mentioned. The plugin now accounts for a custom WP_PLUGIN or WP_CONTENT directory, as well as for custom plugin folder names like “php_execution” or “php-execution-plugin”.
In either way it should work right now.
But as always: For the changes to take effect, the browser cache needs to be cleared.
Is this plugin supposed to be compatible with WPMU?
There is something wrong.
Sometimes the code is translated in HTML, sometimes it just disappears after saving the contents.
In any case, doesn’t seems to work to me.
- WP 2.7.x
- “WordPress should correct invalidly nested XHTML automatically”: never enabled
- Cache cleared
- Plugin just downloaded
I give up: I’ll look for something working.
@Jacob
Actually i haven’t tested the compatibility to WPMU yet. But as 99% of the code of WPMU is congurent to WP there probably are no issues. I’ll add another comment, when i have tested it. But in general, if you offer WP as a service to the outside world, i doubt that it is a good idea to grant php execution permissions.
@Andrea
What you describe is the “normal” PHP editing behavior of TinyMCE. You probably have missed to install the plugin properly (either installation itself or cache clearing).
Absolutely fantastic plugin.
I have been banging my head against several other PHP execution plugins for hours, all of which execute each code snippet as if it stands alone … grrr … and then I finally find this thorough piece of work which not only executes the whole page in one go, thus allowing multi-line PHP wrapped around HTML, but also permits continued use of the WYSIWYG editor in the most delightful way!
Many thanks and keep up the good work.
Thanks a great for your help! The plug in works beautifully!! Thank you very much!!
I have one more question, forgiving my devotion to small details: can I list the links according to the website titles, not the author names? The default display all links and order list by Name in ASCENDING…
Again, thank you very much for your wonderful plug in!!
Not compatible with WP 2.8 ? I found WP 2.8 would replace <?php to < ?php automatically. Hope this problem would be fixed.
Just checked the plugin with WP 2.8. It is working without any problems.
There were no sensitive changes in WP 2.8 that affect the functionality of PHP Execution.
The most important file for the functionality of the plugin (wp-admin/js/editor.js) was not altered severely.
Perhaps you forgot to clear the browser cache or there is a conflict with another plugin you have installed.
I’m unable to get an include statement to work. I’ve tried modifying the statement in every way – single quotes, double quotes, with/without prarentheses, etc. Print statements work so I know PHP code is executing.
Is there any reason why an include statement won’t work with this plugin?
Thanks!
After further testing, I’ve determined it has something to do with the host or possibly the php.ini file. I’m able to use this plugin on a site hosted by Bluehost. It doesn’t work on a site hosted on 1&1.
Any ideas would be aprreciated.
Thanks!
@kurt:
it is hard to tell with so little information. What does “it does not work mean”? Are there any errors thrown by php and if so what is their content? Settings in the php.ini could possibly be the cause, but what are the differences between the settings on bluehost and 1&1. Is there any link to a phpinfo() file where one can check the settings?
Interesting. In my blog I can’t add php directly on the editor, it always split <?php to < ?php. So I need to go to phpMyAdmin and fix it, then always when I have to edit a post I must avoid Wordpress editor and go to phpMyAdmin.
I always used PHP-Exec to add PHP to posts. Is your plugin compatible with it? If I disable it and enable your plugin, will all old posts keep working?
@Hikari:
PHP Execution will be compatible to every other plugin that stores php code in the database with the usual < ?php ... ?> tags. As far as i know these are:
PHP Execution is not compatible to:
This plugin keeps php code inside html tags in the database and parses these tags on every page request before evaluating the php code. This also leeds to unnecessary overhead.
Excellent plugin! Thank you.
Wonderful plugin. However, I’m trying to use the $_SERVER['REMOTE_ADDR'] superglobal within the php code in a post, and because Wordpress is executing the code, it’s using my webservers IP address instead of the visitors IP.
Any ideas how to get round this? Basically I’m trying to geo-localize the post based on the users IP….
Hello;
I have found an unfortunate bug in this plugin. When php is embedded in another tag (such as ‘
<a href="" id="post-">‘), the WYSIWYG editor destroys the php code!Perhaps my example will work with escaped tags:
<a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>">Aaaand another bug:
If wordpress autosaves a draft while the WYSIWYG view is open, all php is turned into image tags and lost.
@AM:
Does the superglobal $_SERVER[REMOTE_ADDR] really only differ when executing PHP Code with this plugin??? Or is your webserver’s IP also printed when you put an "echo $_SERVER[REMOTE_ADDR]" statement hardcoded "in the loop" of wordpress.
@karl:
Writing PHP Code inside of tags is not possbile with this plugin. This is not a bug, but owed to the basic functionality of the plugin as PHP Code is encoded to an image tag in the WYSIWYG editor. If this image tag is surrounded by other html tags and the result is no valid html, TinyMCE strips it out.
A working example for your code would be:
<?php echo '<a href="' . the_permalink() . '" id="post-'. the_ID() . '" >'; ?>Now the PHP code is not inside of a html tag, but echos a valid html tag.
On your last question: The functionality of this plugin is to turn PHP Code into image tags when switching between source and WYSIWG view of the editor. That’s the basic functionality to retain and not loose the code. But i will have a look on the autosave functionality of drafts. Perhaps there are some differences when posts are saved via ajax requests which is the case for drafts. I personally have turned drafts off in my installation of wp as drafts are cluttering up the database.
Hi Nicolas,
I tested your plugin with WPMU 2.7.1 on my localbox and it doesn’t seem to work.
It activates fine, but PHP code gets stripped from the post.
Hi Nicolas,
Just an update.
Your plugin does work on WPMU.
WPMU adds a layer of security that filters out posts.
Downloading a plugin called “Unfiltered MU” will fix this problem for admins and editors.
http://wordpress.org/extend/plugins/unfiltered-mu/
Thanks a lot for sharing this info !!!
While trying to figure out why your plugin would not work I discovered that if the “WordPress should correct invalidly nested XHTML automatically” is checked under the Writing settings in WP admin, the editor will convert <?php to < ?php (note the extra space before the ?).
Once I unchecked that option, your plugin worked.
Got “<?php to < ?php" problem on category and archive pages.
It works fine only on article page.
WP 2.8.2.
Tried "Unfiltered MU"and “WordPress should correct invalidly nested XHTML automatically" with no effect.
Hey Ya i also tried it with wordpress mu 2.8.2 with the “Unfiltered MU” plugin and it still removed the php tags
I’ve really been enjoying your plugin. I have one problem. When I sign in on the http:/website/wordpress/wp-admin login I get this error message: Fatal error: Call to a member function on a non-object in /hsphere/local/home/my client’s site/wp-content/plugins/php-execution-plugin/includes/class.php_execution.php on line 99
The error is in the initing object with wp settings section and the code line is: $this->current_user_can_exec_php = $current_user->has_cap(PHP_EXECUTION_CAPABILITY);
Any idea what is going on?
Trying to use this plugin build and process forms (in Pages, not Posts). The $_POST global appears to always be empty even if form fields are filled in. Is there something about WordPress I’m missing? $_REQUEST has values from $_GET, but not $_POST.
Can someone point me at a solution?
@Paul
Even if i don’t know why the $current_user object does not already exist in your case, if have added a bugfix that fixes this problem. Version 1.0.1 is now available both from the wordpress plugin repository and this site.
@Richard
I think that your problem is not plugin specific but rather a more general one.
@nik
Thanks for your response. I downloaded and installed 1.0.1 and got the same message. Also, in the list of plugins it is listed as Version 1.0.0 | By Nicolas Zeh. So I am not sure if the version number was not updated or I downloaded the wrong verson. What do you think? Do you need any particular info from me?
wow. Great plugin. Very handly tool. Big Thumb Up
@nik
I tried your sample code that you used here: http://screencast.com/t/GVZsv43Q, but the test if statement is failing. Im running wp 2.8.4. Any ideas?
@nik
nevermind, im retarded
Simple things like this dont work though. Result is showing null:
I apologize for all the comments, wish i could edit them. Since i cant post php, here is a image of the code
http://screencast.com/t/7D4S7YOfsQ
This plugin uses PHP to evaluate PHP. So in almost all cases when the result is erroneous, it is not a bug in the plugin but an error in the php code, that was added to a post.
In your case it is not even an error, but only an unexpected result.
A little explanation to your code:
function execute_php() { $package = 'test'; global $package; var_dump($package); } execute_php();In the first line you create a variable named
$packagein the local (i.e. function) scope and assign the string"test"to it.In the second line you “import” a variable named
$packagefrom the global scope to the local scope. This means that the value of the variable$packagein the global scope is assigned to the variable$packagein the local scope. It overwrites the local value.As the variable
$packageis obviously not defined in the global scope, thevar_dumpstatement in line 3 printsNULL.@nik: Thank you for providing this plugin. I’m eager to use it, but can’t seem to get it working.
The plugin is installed, and the PHP icons appear in the visual editor when I use your provided example. The issue is the php code isn’t being executed but simply echoed to the browser. The whole script is viewable in the html source. Does something need to be configured in my php configuration perhaps? I’ve verified “allow_url_fopen = On” in the php.ini file.
I’m using php5, apache2 with WP 2.8.4
Thanks
@Brad
The plugin uses PHP’s eval function to evaluate the PHP code inside of posts. Somehow this function is not executed properly on your host. This can be due to:
<?phpand not like<? php(blank space) or<\?phpetc.And make sure the option “WordPress should correct invalidly nested XHTML automatically” is not enabled in your WP settings. The PHP ini option “allow_url_fopen” is not needed by the plugin.
@nik:
Thanks for the quick reply. I’ve confirmed that the “WordPress should correct invalidly nested XHTML automatically” is unchecked in the WP -> Writing settings.
The code snippet I’m using is a cut & paste of your example in the documentation.
The test was successful.
The test failed.
I’m uncertain where eval might be disabled. Nothing stands out in php.ini. Any ideas would be most welcome. Thanks.
Hey there,
Cool plug-in! The main thing I want to use it for is accessing WP’s own PHP functions within a page.
After activating your plug-in, the following works just fine:
However, what I’d REALLY like to do is use the bloginfo function so that my base URL can be updated dynamically without breaking a javascript demo I have. The code in theory would look like this:
<script src="/demo/myscript.js">
If I replace only the PHP closing tag with the > thang, it still gets messed up. I assume it's to do with all the other tags I have in that soup, but I'm not sure how to resolve so that I can dynamically point to myscript.js.
Any ideas? Is it even possible? Making a separate template that uses the PHP is not in the cards.
bah, something messed up with my pre and code tags. Not sure if the original post is preserved in the back end… let me know if you need me to try again.
@Greg:
Due to the missing code i don’t know if i get your problem right.
The plugin transfers the PHP code added in code view to an image tag when switching to wysiwyg view in the editor. So you can’t use PHP code in the html markup where an image tag would not be valid.
E.g.: The following will mess up:
<script src="<?php echo $BASE_URL; ?>/demo/myscript.js">Instead you have to write it like this:
<?php echo '<script src="' . $BASE_URL . '/demo/myscript.js">'; ?>In the second example the php code is NOT somewhere in the quotes of a script tag and therefore will result in a valid html image tag (<img src="..." />) when you switch to wysiwyg mode.
Hopefully that is the solution to the problem you are facing.
Hey Nik, any plans on adding PHP functionality to widgets?
hi!
VERY nice plugin! The only issue i have is, for it to work, the option “wordpress should fix xhtml tags” has to be turned off.
I believe it could be easily bypassed if you could set your plugin to use a custom tag (like [PHP] or or ).
All the trouble with the visual editor would easily be solved too.
thank you for sharing your work!
Alex
Funciona muy bien este complemento, eso sí, tengo que editar en modo HTML, pero no importa, me funciona con el path /wp-content/plugins/php-execution-plugin
This plugin works nice, and, i have to edit php code in HTML mode, by the way, works for me with /wp-content/plugins/php-execution-plugin path. Excuse my bad english
Just what I’ve been looking for! Amazing! Thank you so much for this plugin.
Hi,
really like the plugin but I’m having some problems unfortunately. I’ve written a plugin to display a gallery of images. The plugin provides a function to be called from the theme in order to print the html, style and javascript associated.
Now the problem is that the newline feeds in the plugin .php file seems to be interpreted and enclosed in p-tags. This botches the javascript. I’ve tried keeping all javascript on one singleline in the .php file and it seems to help somewhat but it’s not enough.
Anyone else had these problems?
I’ve made sure that the option for wordpress correcting xhtml is off, I’ve cleared the cache and I’m running WP 2.8.4.
Hi, just to mention.
I encountered the following bug on WP 2.8.6 : the editor role loses the “manage comments” capability. Or so does it seem (actually a plugin like Capability Manager still reads this capacity for this role, but the fact is that logged in as an editor in the admin section, the input checkbox to manage the comments are not printed and a message “You’re not allowed…” is given to any attempt to do so from the “moderate” link in the public pages).
Disabling PHP Execution solves the problem, but of course, this is not wished.
Any suggestion ?
PS : other troubled user http://wordpress.org/support/topic/335007#post-1293245
Hi
I have used your plugin – GREAT ONE!
However, after upgrading til WP 2.9, it mess up my frontpage. I have deactivated ALL my plugins and have avtivated one at a time. When I activate the PHP plugin, things goes wrong!
@monbouc:
The link you provided is refering to a different plugin called exec-php and not PHP Execution. That is probably why i cannot reproduce your problem.
@Ronni
PHP Execution is not compatible with Wordpress 2.9 yet.
I will have a look on it and post a new version of PHP Execution in January.
Great Plugin right upto i had spent 5 hours coding combo boxes with specific data from categories and then I switch to visual mode to start formatting the page and it all goes!! I chose your plugin as you state it doesn’t disappear…… Have you fixed this??? using 2.9
Is there anyway I can get my lost code back????
Thanks for the useful plugin; it appears to be working okay in my WP 2.9 blog. The one gotcha I just discovered is that it is trying to execute PHP code I use in posts to display using SyntaxHighlighterPlus plugin (http://thislab.com/2007/12/16/release-wordpress-plugin-syntaxhighlighter-plus/). It would be useful if there was a way to disable PHP Execution per post or code block, or if it ignored code inside the SyntaxHighlighterPlus shortcodes.
My current end around has been changing the author on posts with embedded code for display to a non admin author.
PS your captcha is not working.
Editor(editor role) can not edit posts after activation of the plugin. Bug- Please fix it
Thanks for this, exactly what I needed!
I was having trouble until I put it within the
tags in the HTML editor, in case that helps anyone out.Sorry for my above – I meant to write the
tags.Crikey! Nik, sorry for bombarding your comments.
Once I put the PHP inside the “code” tags in the HTML editor, everything worked great.
How is the updated for 2.9 coming.
I have tried it on a page entry and the php icon shows up in the view, but when I load the page there is no result. I am just trying a simple hello world.
Inquiry.
Great plugin. Everything was working very well and still is aside from one caveat. I have a require_once in each blog post that runs a php script to pull and display some data. When any individual blog entry is viewed, it works great, but when I go to the main page, only the first post on the page (no matter which is the first) executes and displays the results…all following blog entries on same page render the blog title but do not execute the php. I’ve played around with the various require and include statements and checked my open closing blocks to no effect. Can’t figure out why this occurs. Thanks much for pondering this.
Thanks for the plugin. It’s great.
Can you make it work for text widgets as well?
I have carefully developed some php code on a page ready to transfer to a text widget once it was completely sorted. However when I came to do this I realised that your plugin doesn’t extend to text widgets!!! Is there an easy way to make it work in text widgets as well?
After installing PHP Execution, my Firefox browser on my PC stopped loading my blog correctly. Some posts come up with the headline and comments, but no text. Others come up with the headline and text, but not the photo that goes with the post. I cleared the cache many times and re-installed Firefox without fixing the problem. Then I decided to use Firefox on another computer on my network — and it is having the same problems with the blog. So could the plug-in have corrupted code that Firefox uses that Safari, IE and Chrome don’t? My Web host said they couldn’t see any problems on their end.
Thank you.
Hello, justed wanted to say thanks for the plugin! It’s very useful. I’m on WP 2.9.2 and using 1.0.1 version of the plugin. For whatever reason, PHP code won’t process unless I use <?PHP (uppercase). If I use <?php (lowercase) I get no errors and a nice white screen. My host is Linux but either case works fine in a standard .php page. Just wanted to share in case anyone else has this issue as well. Thanks again.
Plugin works great.
One question, on the page with PHP, the side menu no loger has the group Pages and Blogroll. When going back to other pages or posts, the Pages and Blogroll group re apears on the side menu in WP
Hello,
This plugin sounds great but i’m not able to use it.
I’m on WP 2.9.2 and with this code :
last_name . “, ” . $user_info->first_name . “\n”);
?>
in an article I only have a part of the code appearing :
echo($user_info->last_name . “, ” . $user_info->first_name . “\n”);
?>
Could you help me please ?
Eric
I am receiving the following error and my PHP is at a begineer level so I am not sure if this problem is in my code or with the plugin. Any helpful suggestions?
Fatal error: Call to a member function search_getMatchingTopics() on a non-object in /home/content/site/html/wp-content/plugins/php-execution-plugin/includes/class.php_execution.php(273) : eval()’d code on line 9
My Code:
‘hybrid’
);
#get Matching Topics
$matching_topics = $api->search_getMatchingTopics($params);
?>
My Code:
‘hybrid’
);
#get Matching Topics
$matching_topics = $api->search_getMatchingTopics($params);
?>
I’m trying to implement an existing form into WordPress and am not having much luck. I’ve tried your plugin and am getting a series of error messages that look like this:
Warning: Unknown(/objects/class.database.php): failed to open stream: No such file or directory in /var/www/html/beta/wp-content/plugins/php_execution/includes/class.php_execution.php(273) : eval()’d code on line 7
Warning: (null)() [function.include]: Failed opening ‘/objects/class.database.php’ for inclusion (include_path=’.:/usr/share/pear’) in /var/www/html/beta/wp-content/plugins/php_execution/includes/class.php_execution.php(273) : eval()’d code on line 7
Warning: Unknown(/objects/class.order.php): failed to open stream: No such file or directory in /var/www/html/beta/wp-content/plugins/php_execution/includes/class.php_execution.php(273) : eval()’d code on line 8
Warning: (null)() [function.include]: Failed opening ‘/objects/class.order.php’ for inclusion (include_path=’.:/usr/share/pear’) in /var/www/html/beta/wp-content/plugins/php_execution/includes/class.php_execution.php(273) : eval()’d code on line 8
Do you have any advice as to how to clear these?
Thank you very much in advance,
Lisa Cowan
Is this plugin compatible with 2.9 yet? Switching to the visual editor is destroying my php code.
Same.
When I switch to Visual editor and then go back to HTML – code is messed, parse errors etc.
Can You fix it?
I’m running WP 2.9.2 and the plugin works well, but I’m having a frustrating issue. It works for my actual posts page, but it will not work with content that uses excerpts or teasers. I am using the Thesis WP theme. Any help on how to get the code to work in excerpts?
Same issue here with uppercase.
For some reason, Wordpress was ignoring my php code until I used uppercase PHP in the snippet. Thanks to @Trevor!!!
It was working fine with lowercase before…don’t know what happened.
Same issue with uppercase.
I so far love this php plugin but the one issue I have with this is that it does not parse the php code if the page is down the first directory.
For example
A simple code like works with the domain http://mysite.com/ and http://mysite.com/about/
But it won’t work on a site that has http://mysite.com/about/dr-john
Why is that?
Thanks
Hi
This is exactly what I am loking for, as I dont want to swicth off the visual editor for a little php code…
Unfortunately, it seems not work for my case..
I have a page that attempts calling images from the template directory:
<img src="/images/pixel_trans.gif” width=”15″ height=”1″>
WIthout the plugin, it turns the into strange characters when I switch to visual editor
With the plugin, it forgets it is a tag… and turns into
/images/pixel_trans.gif” width=”15″ height=”1″ >
Any way around?
Thks