runPHP Plugin for WordPress

Update: 2.3.1 - Important security fix, should work on PHP4 again. Thanks for all the quick information regarding the break!

runPHP is a WordPress plug-in that enables users to embed PHP code directly into their posts.

runPHP 2.3.1 is now available! It does work with WordPress 2.2.x; it fixes some important SQL-injection vulnerabilities and should work with PHP4. (Let me know ASAP if it doesn’t!)

What’s New

  • Using a global DEFINE instead of a class static member variable so it works with PHP4 again.
  • Adjusted code to catch possible SQL-injection vulnerabilties (Thanks to Benjamin Flesch of mybeNi websecurity. )

See the full changelog, or browse our SVN repository.

A forum for discussing issues and experiences with this plugin is available at www.nosq.com/forum. (free, captcha-based registration required) It might be easier to get my attention via the contact form though.

Download

  • runPHP 2.3.1 - .zip file of latest version - only for WordPress 2.0 or higher

Sorry, but previous (1.5.x) versions of WordPress are no longer supported.

New Features

  • Permission to use runPHP is controlled by Roles and Capabilities
  • Configure those permissions in the new runPHP Options page
  • Also works in your feeds (RSS, RSS2, Atom, & RDF)
  • Better integration with WordPress 2.0 administrative UI
  • Internationalization support: English (default), German, and French so far
  • Refactored code - friendlier function names, encapsulated in a class
  • Now works on PHP4 servers as well! (see caveats, below, though)

User Manual

See the runPHP manual page.

Also, runPHP has been given its own page on this blog. In the future, all updates were be published there, though this entry will remain open for comments.

Sample Code

<?php
   $curDate = date('D., F jS Y H:i:s');

   echo "\n<p>";
   echo 'Right now the server thinks it is ' . $curDate;
   echo "\n</p>";
?>

Result:

Right now the server thinks it is Fri., May 9th 2008 08:24:30

Similar plug-ins

  • EzStatic3 allows you to embed other HTML or PHP pages into your WordPress posts - this a little different than what runPHP does
  • PhpExec does pretty much the same thing runPHP is doing, and some people report better luck getting it to work for them.

272 Comments on “runPHP Plugin for WordPress”

(only showing the 10 most recent - View All Comments)

Jean-Luc, April 20th, 2008 at 3:26 am

Thank you again for this great plugin. I am happily using runPHP, but I am now facing an unexpected problem.

The problem is that the main feed returned :
PHP Fatal error: Maximum execution time of 30 seconds exceeded in /…/wp-includes/formatting.php on line 685

I had to reduce the number of posts in the syndication feed to 3 to get rid of this error message.

On top of that, when looking at the content of the feed, I see that some parts of my PHP script included in the posts are not correctly executed, while no problem like this appears when viewing the post itself. It seems that my PHP script is not able to open some data file when called by the feed.

Any thoughts ?

Tageshoroskop, April 21st, 2008 at 5:51 pm

I am still using PHP4 and it doesn´t work probably…
What did i wrong??

brady, April 23rd, 2008 at 1:53 pm

hello wordpress howe do my site http://www.dodownload.net/index.php/email-tools/spamfighter-standard-6229.html thanks

MyFrom, May 1st, 2008 at 3:30 pm

Thanks ..

Moto, May 4th, 2008 at 4:52 am

I badly understand English, but in general I have understood this clause
, also I wish to tell that in my head that that has exchanged. Now I shall think on another. Actually I shall try it, and I hope to me it will help. And I consider that in some moments you are really right. But not on 100 %, excuse

Thanks, prosperities to you!

P.S. Excuse for that that badly I write on English

HTML Guru, May 6th, 2008 at 3:30 am

This is a really sweet plugin, thanks for sharing. For me it basically means that I can write my own quick plugins straight into the page without having to write the usual plugin bumpf.

Thanks

Mario, May 6th, 2008 at 5:49 am

Very interestingly! The truth I think that in some moments you are wrong. If not the mountain goes to magomedy magomed goes to mountain. Therefore before to make it is necessary to think hundred times. And so the book interesting.

P.S. I very badly speak on English, excuse if has badly written

komedi, May 6th, 2008 at 10:09 am

Hola, genial tu articulo, pero me gustaría poder ver los enlaces, no aparencen o hay algún problema, me interesa saber si se tienen que cambiar los permisos solo si se usa el plugin o no?. Gracias

canlı tv izle, May 9th, 2008 at 6:04 am

Canlı Tv, tv izle, televizyon kanalları, yerel kanallar,dünya kanalları, show tv, kanal d, star tv, stv, kontv, yerel televizyonlar, videolar, video izle, dizi fragmanları, diziler, videolar, youtube, google video, full diziler

youtube, May 9th, 2008 at 6:05 am

youtube video izle

Leave a Reply

Login Method

OpenID

Anonymous