web/wp-content/plugins/exec-php/docs/readme.html
branchwordpress
changeset 123 561aa6d282f6
equal deleted inserted replaced
112:fb7cd02b9848 123:561aa6d282f6
       
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
       
     2 <html xmlns="http://www.w3.org/1999/xhtml">
       
     3 <head>
       
     4 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
       
     5 <meta name="robots" content="noindex">
       
     6 <title>Bluesome - Exec-PHP plugin for WordPress</title>
       
     7 </head>
       
     8 <body>
       
     9 <h1>Bluesome</h1>
       
    10 <h2>Exec-PHP plugin for WordPress</h2>
       
    11 
       
    12 <!-- start of content -->
       
    13 <h3>What does this plugin do?</h3>
       
    14 <p>The Exec-PHP plugin executes <code>&lt;?php ?&gt;</code> code in your posts, pages and text widgets.</p>
       
    15 
       
    16 <h3>Make it quick. Where can I download the plugin?</h3>
       
    17 <p class="marker centered"><a style="font-size: 1.5em;" href="http://bluesome.net/data/2005/08/exec-php.zip">Download Exec-PHP 4.9 here!</a></p>
       
    18 
       
    19 <h3>Why is there so much text below?</h3>
       
    20 <p>Because I hate cool plugins that are badly documented. Even the smallest piece of code needs some documentation. The following text is pretty exhaustive. Feel free to skip the sections you are not interested in. If you have a question about the plugin please first make sure you refer to the latest version and the question is not answered on this page or in the <a href="http://bluesome.net/post/2005/08/18/50/#comments-50">comments section of the plugin homepage</a>. Then - and only then - <a href="http://bluesome.net/post/2005/08/18/50/#response-50">post your question here</a>.</p><!--more-->
       
    21 
       
    22 <h3 id="toc">Table of content</h3>
       
    23 <ol>
       
    24 	<li><a href="#introduction">Introduction</a>
       
    25 		<ol>
       
    26 			<li><a href="#motivation">Motivation</a></li>
       
    27 			<li><a href="#features">Features</a></li>
       
    28 			<li><a href="#concepts">Concepts of Exec-PHP</a></li>
       
    29 			<li><a href="#difference">Difference to similar plugins</a>
       
    30 				<ol>
       
    31 					<li><a href="#sniplets">Sniplets</a></li>
       
    32 					<li><a href="#runphp_somerville">RunPHP 0.2.2 (Mark Somerville)</a></li>
       
    33 					<li><a href="#runphp_vanlommel">RunPHP 2.1.1 (James Van Lommel)</a></li>
       
    34 					<li><a href="#php_exec">PHP Exec 1.7</a></li>
       
    35 					<li><a href="#ezstatic_3">EzStatic 3</a></li>
       
    36 					<li><a href="#other_plugins">Other plugins</a></li>
       
    37 				</ol>
       
    38 			</li>
       
    39 		</ol>
       
    40 	</li>
       
    41 	<li><a href="#installation">Installation</a>
       
    42 		<ol>
       
    43 			<li><a href="#requirements">Requirements</a></li>
       
    44 			<li><a href="#install">Installing the plugin</a></li>
       
    45 			<li><a href="#upgrade">Upgrade from previous versions</a></li>
       
    46 			<li><a href="#upgrade_from_2_0">Upgrade from version 2.0 and earlier</a></li>
       
    47 			<li><a href="#upgrade_to_4_2">Upgrade to version 4.2 and above</a></li>
       
    48 			<li><a href="#deactivation">Deactivating the plugin</a></li>
       
    49 			<li><a href="#uninstall">Uninstalling the plugin</a></li>
       
    50 			<li><a href="#translation">Exec-PHP in your language</a></li>
       
    51 			<li><a href="#translating">Translating Exec-PHP</a></li>
       
    52 		</ol>
       
    53 	</li>
       
    54 	<li><a href="#usage">Usage</a>
       
    55 		<ol>
       
    56 			<li><a href="#execute_php">Executing PHP code</a></li>
       
    57 			<li><a href="#configuration">Configuration</a></li>
       
    58 			<li><a href="#misconfiguration">Misconfiguration</a></li>
       
    59 			<li><a href="#basic_test">Basic test</a></li>
       
    60 			<li><a href="#tag_balancing">WordPress' XHTML tag balancing</a></li>
       
    61 			<li><a href="#wysiwyg_editor">Writing PHP code with the WYSIWYG editor</a></li>
       
    62 			<li><a href="#allow_writing">Allowing PHP code to be written in articles</a></li>
       
    63 			<li><a href="#allow_execution">Allowing PHP code execution in articles</a></li>
       
    64 			<li><a href="#allow_widget">Allowing PHP code in text widgets</a></li>
       
    65 			<li><a href="#wp_configuration">Overview of tasks and their required WordPress configuration</a></li>
       
    66 			<li><a href="#security">A word about security</a></li>
       
    67 			<li><a href="#security_holes">Security holes</a></li>
       
    68 		</ol>
       
    69 	</li>
       
    70 	<li><a href="#troubleshooting">Troubleshooting</a>
       
    71 		<ol>
       
    72 			<li><a href="#incompatibilities">Incompatibilities to other plugins or themes</a></li>
       
    73 			<li><a href="#limitations">Limitations</a></li>
       
    74 			<li><a href="#bugs">Reporting bugs</a></li>
       
    75 			<li><a href="#tests">Tests to assert plugins functionality</a></li>
       
    76 			<li><a href="#faq">FAQ - Frequently asked questions</a>
       
    77 				<ol>
       
    78 					<li><a href="#generallybroken">Why doesn't the Exec-PHP plugin work as described here?</a></li>
       
    79 					<li><a href="#brokentag">Why does WordPress mess' up my <code>&lt;?php ?&gt;</code> tags after saving the article?</a></li>
       
    80 					<li><a href="#evalerror">Why does the plugin fail with an <code>eval()</code> error when executing my code?</a></li>
       
    81 					<li><a href="#printcode">How can I just print out PHP code and don't execute it?</a></li>
       
    82 					<li><a href="#already_defined">Why does my newsfeed spits out parsing errors?</a></li>
       
    83 					<li><a href="#globals">Why does my included PHP file causes parsing errors?</a></li>
       
    84 					<li><a href="#wordpressmu">Does the plugin works with WordPress MU?</a></li>
       
    85 					<li><a href="#create_site">How do you create the plugin homepage?</a></li>
       
    86 				</ol>
       
    87 			</li>
       
    88 		</ol>
       
    89 	</li>
       
    90 	<li><a href="#past_present_future">Past, present and future</a>
       
    91 		<ol>
       
    92 			<li><a href="#new_versions">New versions</a></li>
       
    93 			<li><a href="#history">History of older versions</a>
       
    94 				<ol>
       
    95 					<li><a href="#version_4_9">Version 4.9 (2009-01-07)</a></li>
       
    96 					<li><a href="#version_4_8">Version 4.8 (2008-07-05)</a></li>
       
    97 					<li><a href="#version_4_7">Version 4.7 (2008-05-05)</a></li>
       
    98 					<li><a href="#version_4_6">Version 4.6 (2008-04-06)</a></li>
       
    99 					<li><a href="#version_4_5">Version 4.5 (2008-03-24)</a></li>
       
   100 					<li><a href="#version_4_4">Version 4.4 (2008-01-29)</a></li>
       
   101 					<li><a href="#version_4_3">Version 4.3 (2007-12-11)</a></li>
       
   102 					<li><a href="#version_4_2">Version 4.2 (2007-11-03)</a></li>
       
   103 					<li><a href="#version_4_1">Version 4.1 (2007-10-27)</a></li>
       
   104 					<li><a href="#version_4_0">Version 4.0 (2007-10-25)</a></li>
       
   105 					<li><a href="#version_3_4">Version 3.4 (2007-10-08)</a></li>
       
   106 					<li><a href="#version_3_3">Version 3.3 (2007-08-11)</a></li>
       
   107 					<li><a href="#version_3_2">Version 3.2 (2007-02-10)</a></li>
       
   108 					<li><a href="#version_3_1">Version 3.1 (2007-02-09)</a></li>
       
   109 					<li><a href="#version_3_0">Version 3.0 (2006-08-06)</a></li>
       
   110 					<li><a href="#version_2_0">Version 2.0 (2005-12-22)</a></li>
       
   111 					<li><a href="#version_1_2">Version 1.2 (2005-12-04)</a></li>
       
   112 					<li><a href="#version_1_1">Version 1.1 (2005-08-19)</a></li>
       
   113 					<li><a href="#version_1_0">Version 1.0 (2005-08-18)</a></li>
       
   114 				</ol>
       
   115 			</li>
       
   116 			<li><a href="#roadmap">Roadmap</a></li>
       
   117 		</ol>
       
   118 	</li>
       
   119 </ol>
       
   120 
       
   121 <h3 id="introduction">Introduction</h3>
       
   122 
       
   123 <h4 id="motivation">Motivation</h4>
       
   124 <p>When I was in need of a PHP plugin for my WordPress blog back in 2005, there was no plugin available that allowed me to write PHP code the way I was used to. For example some plugins required the PHP code to be encapsulated in XHTML tags like <code>&lt;phpcode&gt; &lt;/phpcode&gt;</code>. This differed from the usual way you write PHP code where you only use <code>&lt;?php ?&gt;</code>. Some of the plugins evaluated the code after WordPress applied some filters like texturize. So it also texturized the PHP code and the plugins had to undo the texturize just for the code part. For more complex code this can not be done correctly because of ambiguity and often led into parsing errors even if the code was syntactically correct.</p>
       
   125 
       
   126 <h4 id="features">Features</h4>
       
   127 <ul>
       
   128 	<li><a href="#execute_php">Executes PHP code in the excerpt and the content portion of your posts and pages</a></li>
       
   129 	<li><a href="#allow_widget">Configurable execution of PHP code in text widgets (for WordPress 2.2 or higher)</a></li>
       
   130 	<li><a href="#basic_test">Write PHP code in familiar syntax, e.g. <code>&lt;?php ... ?&gt;</code></a></li>
       
   131 	<li><a href="#execute_php">Works in your newsfeeds</a></li>
       
   132 	<li><a href="#configuration">Information about which user is allowed to execute PHP with the current security settings (for WordPress 2.1 or higher)</a></li>
       
   133 	<li><a href="#execute_php">Configurable user warnings for inappropriate blog and user settings (for WordPress 2.1 or higher)</a></li>
       
   134 	<li><a href="#wp_configuration">Restrict execution of PHP code in posts and pages to certain users by using roles and capabilities</a></li>
       
   135 	<li><a href="http://wordpress.org/extend/plugins/exec-php/">Update notifications through the 'Plugins' menu in WordPress if a new version of the Exec-PHP plugin is available (for WordPress 2.3 or higher)</a></li>
       
   136 	<li><a href="#translation">Internationalization support (english and german included, many more available)</a></li>
       
   137 	<li><a href="#toc">Comes with documentation</a></li>
       
   138 </ul>
       
   139 
       
   140 <h4 id="concepts">Concepts of Exec-PHP</h4>
       
   141 <p>Technically Exec-PHP executes code inside of arbitrary text by wrapping the whole text into <code>?&gt; &lt;?php</code> tags and hand it over to the PHP <a href="http://de.php.net/manual/en/function.eval.php"><code>eval()</code></a> function. This requires that the executable code itself is encapsulated into <code>&lt;?php ?&gt;</code> tags. By that no parsing of your code needs to be done by the plugin itself.</p>
       
   142 
       
   143 <h4 id="difference">Difference to similar plugins</h4>
       
   144 <p>There are a lot of PHP plugins available all doing slightly different things. The following list was gathered back in the beginning of 2007 and may not be complete and probably outdated because some of the plugins may have been updated, including more features. Therefore the names of the compared plugins are given including the version number.</p>
       
   145 
       
   146 <h5 id="sniplets">Sniplets</h5>
       
   147 <p>The <a href="http://urbangiraffe.com/plugins/sniplets/">Sniplets</a> plugin by John Godley seems to be a good alternative to Exec-PHP. Although it is harder to configure than Exec-PHP, you may gain some improvements in security due to the way the Sniplets plugin is working.</p>
       
   148 
       
   149 <h5 id="runphp_somerville">RunPHP 0.2.2 (Mark Somerville)</h5>
       
   150 <p>The <a href="http://mark.scottishclimbs.com/2004/7/2/running-php-in-wordpress-posts/">RunPHP</a> plugin by Mark Somerville uses XHTML tag syntax to separate code from HTML. It does strange conversions to &quot;fix&quot; texturized posts and does not support WordPress' 2.x roles and capabilites system.</p>
       
   151 
       
   152 <h5 id="runphp_vanlommel">RunPHP 2.1.1 (James Van Lommel)</h5>
       
   153 <p>The <a href="http://www.nosq.com/blog/2006/01/runphp-plugin-for-WordPress/">RunPHP</a> plugin by James Van Lommel creates parsing errors with most of the <a href="#tests">test code below</a>.</p>
       
   154 
       
   155 <h5 id="php_exec">PHP Exec 1.7</h5>
       
   156 <p>The <a href="http://priyadi.net/archives/2005/03/02/WordPress-php-exec-plugin/">PHP Exec</a> plugin by Priyadi Iman Nurcahyo uses XHTML tag syntax to separate code from HTML. It does strange conversions to &quot;fix&quot; texturized posts.</p>
       
   157 
       
   158 <h5 id="ezstatic_3">EzStatic 3</h5>
       
   159 <p>The <a href="http://redalt.com/wiki/EzStatic3">EzStatic 3</a> plugin by Owen Winkler does not execute test #16 (<a href="#tests">see below</a>).</p>
       
   160 
       
   161 <h5 id="other_plugins">Other plugins</h5>
       
   162 <p>Nowadays there are a lot of similar plugins around that I am simply to lazy to write some further text to. If Exec-PHPs functionality does miss some feature you are desperatly seeking, you may want to take a look on one of the various WordPress plugin databases or <a href="http://bluesome.net/post/2005/08/18/50/#response-50">drop a feature request</a>.</p>
       
   163 
       
   164 <h3 id="installation">Installation</h3>
       
   165 
       
   166 <h4 id="requirements">Requirements</h4>
       
   167 <p>You need the following software to be installed on your webserver in order to run the Exec-PHP plugin:</p>
       
   168 <ul>
       
   169 	<li><a href="http://WordPress.org">A running installation of WordPress 2.0.11 or higher</a></li>
       
   170 	<li><a href="http://bluesome.net/data/2005/08/exec-php.zip">The Exec-PHP plugin</a> ;-)</li>
       
   171 	<li><a href="http://im-web-gefunden.de/wordpress-plugins/role-manager/">Optional: The Role Manager plugin by Thomas Schneider</a></li>
       
   172 </ul>
       
   173 
       
   174 <h4 id="install">Installing the plugin</h4>
       
   175 <p>If you have ever installed a WordPress plugin, then installation will be pretty easy:</p>
       
   176 <ul>
       
   177 	<li><a href="http://bluesome.net/data/2005/08/exec-php.zip">Download the Exec-PHP plugin archive and extract the files</a></li>
       
   178 	<li>Copy the resulting <code>exec-php</code> directory into <code>/wp-content/plugins/</code></li>
       
   179 	<li>Activate the plugin through the 'Plugins' menu of WordPress (after a fresh installation only the Administrator is allowed to execute PHP code)</li>
       
   180 	<li><a href="#execute_php">Configure blog and user settings if needed</a></li>
       
   181 </ul>
       
   182 <p>Finished. The rest is self-explanatory. ;-)</p>
       
   183 
       
   184 <h4 id="upgrade">Upgrade from previous versions</h4>
       
   185 <p>Usually if not specifically mentioned on this page you can upgrade from a previous version of this plugin by simply <a href="#uninstall">uninstalling the plugin</a> and afterwards <a href="#install">follow the installation instructions</a>. Note that an upgrade may implicitly migrate settings of an older plugin version. Therefore you will not be able to downgrade back to an older version of the plugin.</p>
       
   186 
       
   187 <h4 id="upgrade_from_2_0">Upgrade from version 2.0 and earlier</h4>
       
   188 <p>Because directory layout has changed, you have to remove your old <code>exec-php.php</code> file from your <code>/wp-content/plugins/</code> directory manually and afterwards <a href="#install">follow the installation instructions</a>. If you have used the alternative styled tags <code>[?php ?]</code> or you have used the old PHP tag formats of <code>&lt; ?php ?&gt;</code> (notice the space) or <code>&lt;? ?&gt;</code> you have to migrate all of these into the format of <code>&lt;?php ?&gt;</code>. You can either do this manually or use the <a href="http://thedeadone.net/software/search-and-replace-wordpress-plugin/">Search and Replace</a> plugin. Since version 3.1 an automatic migration isn't supported anymore for certain reasons.</p>
       
   189 
       
   190 <h4 id="upgrade_to_4_2">Upgrade to version 4.2 and above</h4>
       
   191 <p>Depending on your previously installed Exec-PHP version, you may receive an Exec-PHP security alert in your admin menu. <a href="#security_holes">Read this section to solve this issue</a>.</p>
       
   192 
       
   193 <h4 id="deactivation">Deactivating the plugin</h4>
       
   194 <p>Deactivating the plugin will most likely cause your articles and widgets that contain PHP code to display messed up and may display almost all of your PHP code to your readers. Because of that your PHP code shouldn't contain sensible data e.g. passwords.</p>
       
   195 
       
   196 <h4 id="uninstall">Uninstalling the plugin</h4>
       
   197 <p>For uninstalling the plugin simply delete the <code>exec-php</code> directory from the <code>/wp-content/plugins/</code> directory. You even don't need to deactivate the plugin in the WordPress admin menu. <a href="#deactivation">Read this topic</a> if you want to know what happens to your written PHP code in this case.</p>
       
   198 
       
   199 <h4 id="translation">Exec-PHP in your language</h4>
       
   200 <p>At the moment the english and german translation ships with the Exec-PHP archive. Further translations for the current version are available for:</p>
       
   201 <ul>
       
   202 	<li>English (default, ships with the Exec-PHP plugin archive)</li>
       
   203 	<li>German (ships with the Exec-PHP plugin archive)</li>
       
   204 	<li><a href="http://liseweb.fr/BLOG/?page_id=160">French</a> (thanks to <a href="http://liseweb.fr/">Lise</a>)</li>
       
   205 	<li><a href="http://gidibao.net/index.php/2008/05/07/exec-php-in-italiano/">Italian</a> (thanks to <a href="http://gidibao.net/">Gianni</a>)</li>
       
   206 	<li><a href="http://dimox.name/exec-php-russian-translation/">Russian</a> (thanks to <a href="http://dimox.name/">Dimox</a>)</li>
       
   207 	<li><a href="http://dcabai.blogspot.com/2008/04/exec-php-en-espaol.html">Spanish</a> (thanks to <a href="http://www.cabai.com.ar/">Diego</a>)</li>
       
   208 	<li><a href="http://www.wordthai.com/index.php?topic=34.0">Thai</a> (thanks to <a href="http://www.wordthai.com/index.php?action=profile;u=1">kazama</a>)</li>
       
   209 </ul>
       
   210 
       
   211 <h4 id="translating">Translating Exec-PHP</h4>
       
   212 <p>If you like to see Exec-PHP in a language not listed above, get the Exec-PHP archive and use a tool like <a href="http://www.poedit.net/">poedit</a> to translate the <code>languages/exec-php.pot</code> file. If you are a really tough, you can also translate this <code>readme.html</code> file aswell. If this is to much work, just translate the <code>readme-generic.html</code> file. Save the readme as <code>readme-&lt;locale&gt;.html</code> and put it all into a Zip archive named <code>exec-php-&lt;locale&gt;.zip</code>. Here <code>&lt;locale&gt;</code> is the shortcut of your language. For the german translation this would be 'de_DE'. The resulting Zip archive would therefore be named <code>exec-php-de_DE.zip</code>. The archive must not contain more than the following files:</p>
       
   213 <ul>
       
   214 	<li><code>exec-php/docs/readme-&lt;locale&gt;.html</code></li>
       
   215 	<li><code>exec-php/docs/screenshot-1-&lt;locale&gt;.png</code> (optional)</li>
       
   216 	<li><code>exec-php/docs/screenshot-2-&lt;locale&gt;.png</code> (optional)</li>
       
   217 	<li><code>exec-php/docs/screenshot-3-&lt;locale&gt;.png</code> (optional)</li>
       
   218 	<li><code>exec-php/languages/exec-php-&lt;locale&gt;.mo</code></li>
       
   219 	<li><code>exec-php/languages/exec-php-&lt;locale&gt;.po</code> (optional)</li>
       
   220 </ul>
       
   221 Afterwards upload the archive to your site and write a comment at the <a href="http://bluesome.net/post/2005/08/18/50/#comments-50">comments of the plugin homepage</a> and you will be mentioned in the credits.</p>
       
   222 <p>In case you also provide translation for previous Exec-PHP versions, also link them on your page with the name <code>exec-php-&lt;locale&gt;.&lt;version&gt;.zip</code>. E.g. <code>exec-php.de_DE.4.2.zip</code> for the german translation of Exec-PHP 4.2.</p>
       
   223 
       
   224 <h3 id="usage">Usage</h3>
       
   225 
       
   226 <h4 id="execute_php">Executing PHP code</h4>
       
   227 <p>With Exec-PHP you can execute PHP code in the excerpt and the content portion of your posts and pages (in the following called articles) as also as in text widgets. To execute code, just type in the PHP code as you usually would, encapsulated in <code>&lt;?php ?&gt;</code> tags.</p>
       
   228 <p>Writing code in articles or text widgets may require some further tuning to the blog and user settings. To have the plugin work properly with PHP code in the content of a users article, do as follows:</p>
       
   229 <ul>
       
   230 	<li><a href="#tag_balancing">Disable tag balancing 'WordPress should correct invalidly nested XHTML automatically' through the 'Settings &gt; Write' menu in WordPress</a></li>
       
   231 	<li><a href="#wysiwyg_editor">Disable the WYSIWYG editor in the user's settings through the 'Users &gt; Your Profile' menu</a></li>
       
   232 	<li><a href="#allow_writing">Assign the 'unfiltered_html' capability to the user</a></li>
       
   233 	<li><a href="#allow_execution">Assign the 'exec_php' capability to the user</a></li>
       
   234 </ul>
       
   235 
       
   236 <h4 id="configuration">Configuration</h4>
       
   237 <p>The plugin comes with its own configuration menu that is accessible through 'Settings &gt;  Exec-PHP'. The configuration menu is only accessible for users that do have the 'edit_plugins' capability. This is usually only assigned to the Blog Administrator. If you have disabled Javascript or you are running Exec-PHP with WordPress 2.0.x you will not see or only see parts of the plugin configuration menu.</p>
       
   238 <p>The configuration menu is divided into two parts, the Settings section and the Information section. In the Settings section you can <a href="#allow_widget">adjust the plugin's behavior</a> to your needs while the Information section <a href="#security_holes">shows which users are allowed to execute PHP code</a>.</p>
       
   239 <p><a href="../docs/screenshot-1.png"><img src="../docs/screenshot-1.png" alt="The Exec-PHP configuration menu" /></a></p>
       
   240 
       
   241 <h4 id="misconfiguration">Misconfiguration</h4>
       
   242 <p>If the blog or user settings are not appropriate to write PHP code, you will get a warning on the 'Write' dialog or 'Widgets' menu respectivly.</p>
       
   243 <p><a href="../docs/screenshot-2.png"><img src="../docs/screenshot-2.png" alt="An Exec-PHP warning in the 'Write' menu" /></a></p>
       
   244 <p>The WYSIWYG Convesion Warning can be turned off through the 'Users &gt; Your Profile' menu. Nevertheless, this is not the recommended way, because this can cause you to accidently render PHP code in articles permanently unuseful.</p>
       
   245 <p><a href="../docs/screenshot-3.png"><img src="../docs/screenshot-3.png" alt="Exec-PHP warning configuration in the 'Users &gt; Your Profile' menu" /></a></p>
       
   246 <p>If you have disabled Javascript or you are running Exec-PHP with WordPress 2.0.x you will not receive any warnings even if your blog or user settings are not configured appropriately to run Exec-PHP.</p>
       
   247 
       
   248 <h4 id="basic_test">Basic test</h4>
       
   249 <p>For validating, that the plugin works properly, log in as Administrator, <a href="#execute_php">apply the settings listed above</a> and create a new article and write the following text:</p>
       
   250 <pre><code code-lang="php">&lt;?php echo "This is the Exec-PHP 'Hello World'"; ?&gt;</code></pre>
       
   251 <p>This should always work. When displaying the post and everything works fine, you should see:</p>
       
   252 <pre><code>This is the Exec-PHP 'Hello World'</code></pre>
       
   253 
       
   254 <h4 id="tag_balancing">WordPress' XHTML tag balancing</h4>
       
   255 <p>Depending on your PHP code it may be necessary to turn off WordPress' built in XHTML tag balancing if the code is written in the content of an article. This can be done through the setting 'WordPress should correct invalidly nested XHTML automatically' on the 'Settings &gt; Write' menu in WordPress. If in question, better turn this option off. An alternative to turning this option off may be to install the <a href="http://wp.uberdose.com/2006/10/15/mime-type-plugin/">Mime Type Plugin</a> and use the mime type <code>text/html</code> individually on each article that contains PHP.</p>
       
   256 
       
   257 <h4 id="wysiwyg_editor">Writing PHP code with the WYSIWYG editor</h4>
       
   258 <p>To successfully write PHP code in the content of an article, the WYSIWYG editor needs to be turned off through the 'Users &gt; Your Profile' menu. It is not enough to simply keep the WYSIWYG editor on, switch to the 'Code' tab of the editor in the 'Write' menu and save the article. This will render all contained PHP code permanently unuseful.</p>
       
   259 <p>Instead of turining off the WYSIWYG editor in your user profile you can temporarily disable it for certain articles by using the <a href="http://wordpress.org/extend/plugins/deactive-visual-editor/">Deactivate Visual Editor</a> plugin. I haven't tested it but it sounds like a reasonable solution for you guys that like to use the WYSIWYG editor.</p>
       
   260 <p>If you still are in need of writing PHP code with the TinyMCE WYSIWYG editor, you may want to experiment with <a href="http://tinymce.moxiecode.com/punbb/viewtopic.php?id=3646">some TinyMCE plugins that may allow to write PHP code</a>. Such experiments are outside of the scope of this plugin. From my point of view there is a general requirements conflict when you are in need of writing PHP code with any kind of WYSIWYG editor. Therefore it is not planned to natively support writing PHP code in the WYSIWYG editor for any upcoming release of the Exec-PHP plugin.</p>
       
   261 
       
   262 <h4 id="allow_writing">Allowing PHP code to be written in articles</h4>
       
   263 <p>Before executing PHP code, the user needs to write it first. ;-) A user may experience problems in writing PHP code in the content of an article, because in the way that WordPress will rewrite the code (and therefore will break it for later execution) during saving the article. This is because the user also needs the 'unfiltered_html' capability assigned to.</p>
       
   264 <p>Assigning capabilities to roles or users is out of the scope of this plugin. Because WordPress has no built-in configuration menu in the admin menu to assign roles/capabilities, you need to install one of the available role/capability manager plugins as the one <a href="#requirements">mentioned in the requirements</a>.</p>
       
   265 
       
   266 <h4 id="allow_execution">Allowing PHP code execution in articles</h4>
       
   267 <p>After installation, execution of PHP code is limited to the Administrator role by default. By assigning the 'exec_php' capability to another role or user will allow them to execute PHP code in their posts.</p>
       
   268 <p>Assigning capabilities to roles or users is out of the scope of this plugin. Because WordPress has no built-in configuration menu in the admin menu to assign roles/capabilities, you need to install one of the available role/capability manager plugins as the one <a href="#requirements">mentioned in the requirements</a>.</p>
       
   269 
       
   270 <h4 id="allow_widget">Allowing PHP code in text widgets</h4>
       
   271 <p>By default execution of PHP code in widgets is activated. Any user who has the 'switch_themes' capability can write and execute PHP code in text widgets. Because this may be a security issue, you may want to disable PHP code execution in widgets through the plugin configuration menu.</p>
       
   272 
       
   273 <h4 id="wp_configuration">Overview of tasks and their required WordPress configuration</h4>
       
   274 <p>The following matrix shows which settings need to be applied to perform specific tasks with the plugin:</p>
       
   275 <table>
       
   276 <tr><th style="text-align:center;"><strong>Task</strong></th><th style="text-align:center;"><strong><a href="#tag_balancing">Disable tag balancing</a></strong></th><th style="text-align:center;"><strong><a href="#wysiwyg_editor">Disable WYSIWYG editor</a></strong></th><th style="text-align:center;"><strong><a href="#allow_execution">Assign 'exec_php' cap</a></strong></th><th style="text-align:center;"><strong><a href="#allow_writing">Assign 'unfiltered_html' cap</a></strong></th><th style="text-align:center;"><strong><a href="#allow_widget">Assign 'switch_themes' cap</a></strong></th></tr>
       
   277 <tr><td>Write/edit PHP code in content of articles</td><td style="text-align:center;"><strong>X</strong></td><td style="text-align:center;"><strong>X</strong></td><td>&nbsp;</td><td style="text-align:center;"><strong>X</strong></td><td>&nbsp;</td></tr>
       
   278 <tr><td>Execute PHP code in content of articles</td><td>&nbsp;</td><td>&nbsp;</td><td style="text-align:center;"><strong>X</strong></td><td>&nbsp;</td><td>&nbsp;</td></tr>
       
   279 <tr><td>Write/edit PHP code in excerpt of articles</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td style="text-align:center;"><strong>X</strong></td><td>&nbsp;</td></tr>
       
   280 <tr><td>Execute PHP code in excerpt of articles</td><td>&nbsp;</td><td>&nbsp;</td><td style="text-align:center;"><strong>X</strong></td><td>&nbsp;</td><td>&nbsp;</td></tr>
       
   281 <tr><td>Write/edit PHP code in widgets</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td style="text-align:center;"><strong>X</strong></td><td style="text-align:center;"><strong>X</strong></td></tr>
       
   282 <tr><td>Execute PHP code in widgets</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td style="text-align:center;"><strong>X</strong></td></tr>
       
   283 </table>
       
   284 <p>To make things clear: If a user wants to write a new article and want to execute PHP code inside of its content, he needs to have both - the 'exec_php' and 'unfiltered_html' - capabilities assigned to. Otherwise the PHP code will get messed up during saving the article and the raw PHP code itself will be displayed instead of executing it.</p>
       
   285 <p>For writing and executing code in the excerpt of an article, the user only needs the 'unfiltered_html' capability.</p>
       
   286 <p>If a user wants to write PHP code inside of a text widget, he only needs the 'unfiltered_html' capability. The execution of PHP code inside of widgets is not restricted by any capability. This means that every user of your blog who can write widgets - which is restricted by the 'switch_themes' capability - can execute PHP code.</p>
       
   287 
       
   288 <h4 id="security">A word about security</h4>
       
   289 <p>By using this plugin a user can use the full PHP API and WordPress API. There are no restrictions to execute only certain subsets of functionality. Allowing your users to write and execute PHP code will expose your WordPress installation in specific and your server installation in general. By that a user can easily take over your blog, your server or the whole internet (just kidding about the last one). If in doubt, don't allow a user to execute PHP code. This can be easily <a href="#allow_execution">adjusted on a per user base</a>.</p>
       
   290 
       
   291 <h4 id="security_holes">Security holes</h4>
       
   292 <p>Depending on your configuration, you may receive a security alert that will point you to <a href="#configuration">the 'Security hole' Information section of the plugin configuration menu</a>. This is because you have users defined in your blog (typically called Editors), that are allowed to edit others users articles. If the Editor is not allowed to execute PHP code but the user that the Editor is allowed to edit its articles, then the Editor can add malicious PHP code in this users article.</p>
       
   293 <p>To solve this issue, the Exec-PHP plugin introduces the 'edit_others_php' capability. It is advised to either assign both or none of the 'exec_php' and 'edit_others_php' capability to your editors. You probably want to split the current Editor role into two different Editor roles, one that is allowed to execute and edit other PHP code, and the second that isn't.</p>
       
   294 
       
   295 <h3 id="troubleshooting">Troubleshooting</h3>
       
   296 
       
   297 <h4 id="incompatibilities">Incompatibilities to other plugins or themes</h4>
       
   298 <p>Currently there are no known incompatibilities to other plugins or themes.</p>
       
   299 
       
   300 <h4 id="limitations">Limitations</h4>
       
   301 <p>Besides of limitations with the <a href="#wysiwyg_editor">WYSIWYG editor mentioned above</a>, there currently are no known issues.</p>
       
   302 
       
   303 <h4 id="bugs">Reporting bugs</h4>
       
   304 <p>You can <a href="http://bluesome.net/post/2005/08/18/50/#response-50">post bug reports to the comments</a>. Before doing this make sure your PHP script is running properly in a separate file. If it does, assure that you did not hit the <a href="#globals">&quot;Globals&quot; issue</a>. If you still think it's a bug in the plugin, during writing of the bug report keep in mind that WordPress' commenting system is not build to write unescaped code. So better convert the code to the correct XHTML entities before commenting here. Alternativly point to your code using an external link or <a href="http://bluesome.net/post/author/soeren/#contact-2">get in contact with me by using the contact form of my author page</a>.</p>
       
   305 
       
   306 <h4 id="tests">Tests to assert plugins functionality</h4>
       
   307 <p>Following is a list of tests that were made to assert the plugins functionality. On the left side the PHP code taken directly from the tests is written. On the right side the live output generated by the Exec-PHP plugin is shown. If you view this documentation as a static HTML file obviously the PHP code isn't executed and will look messy. Because of the content of this test, this page will not verify as XHTML. If you think, your favorite PHP plugin is better than this one, try out all the tests below and see if this works correctly.</p>
       
   308 <table width="100%" cellspacing="5px">
       
   309 <tr><th><strong>#</strong></th><th><strong>Code</strong></th><th><strong>Output</strong></th></tr>
       
   310 <tr><td>1</td><td><pre><code code-lang="php">&lt;?php ?&gt;</code></pre></td><td><?php ?></td></tr>
       
   311 <tr><td>2</td><td><pre><code code-lang="php">&lt;?php echo "a?&gt;1"; ?&gt;</code></pre></td><td><?php echo "a?>1"; ?></td></tr>
       
   312 <tr><td>3</td><td><pre><code code-lang="php">&lt;?php echo 'b?&gt;1'; ?&gt;</code></pre></td><td><?php echo 'b?>1'; ?></td></tr>
       
   313 <tr><td>4</td><td><pre><code code-lang="php">&lt;?php echo "a?&gt;2"; ?&gt;</code></pre></td><td><?php echo "a?>2"; ?></td></tr>
       
   314 <tr><td>5</td><td><pre><code code-lang="php">&lt;?php echo 'b?&gt;2'; ?&gt;</code></pre></td><td><?php echo 'b?>2'; ?></td></tr>
       
   315 <tr><td>6</td><td><pre><code code-lang="php">&lt;?php?&gt;</code></pre></td><td><?php?></td></tr>
       
   316 <tr><td>7</td><td><pre><code code-lang="php">&lt;?php echo"a?&gt;3";?&gt;</code></pre></td><td><?php echo"a?>3";?></td></tr>
       
   317 <tr><td>8</td><td><pre><code code-lang="php">&lt;?php echo'b?&gt;3';?&gt;</code></pre></td><td><?php echo'b?>3';?></td></tr>
       
   318 <tr><td>9</td><td><pre><code code-lang="php">&lt;?php echo"a?&gt;4";?&gt;</code></pre></td><td><?php echo"a?>4";?></td></tr>
       
   319 <tr><td>10</td><td><pre><code code-lang="php">&lt;?php echo'b?&gt;4';?&gt;</code></pre></td><td><?php echo'b?>4';?></td></tr>
       
   320 <tr><td>11</td><td><pre><code code-lang="php">&lt;?php echo "c";?&gt;1";?&gt;</code></pre></td><td><?php echo "c";?>1";?></td></tr>
       
   321 <tr><td>12</td><td><pre><code code-lang="php">&lt;?php echo 'd';?&gt;1';?&gt;</code></pre></td><td><?php echo 'd';?>1';?></td></tr>
       
   322 <tr><td>13</td><td><pre><code code-lang="php">&lt;?php echo "c';?&gt;2";?&gt;</code></pre></td><td><?php echo "c';?>2";?></td></tr>
       
   323 <tr><td>14</td><td><pre><code code-lang="php">&lt;?php echo 'd";?&gt;3';?&gt;</code></pre></td><td><?php echo 'd";?>3';?></td></tr>
       
   324 <tr><td>15</td><td><pre><code code-lang="php">&lt;?php
       
   325 echo "impressive\n '";
       
   326 echo 'string\' "';
       
   327 echo "\n\thandling\"";
       
   328 ?&gt;</code></pre></td>
       
   329 <td><?php
       
   330 echo "impressive\n '";
       
   331 echo 'string\' "';
       
   332 echo "\n\thandling\"";
       
   333 ?></td></tr>
       
   334 <tr><td>16</td><td><pre><code code-lang="php">&lt;?php if (1) { ?&gt;
       
   335 &lt;b&gt;Handle THIS!&lt;/b&gt;
       
   336 &lt;?php } else { ?&gt;
       
   337 &lt;i&gt;Handle THAT!&lt;/i&gt;
       
   338 &lt;?php } ?&gt;
       
   339 </code></pre></td>
       
   340 <td><?php if (1) { ?>
       
   341 <b>Handle THIS!</b>
       
   342 <?php } else { ?>
       
   343 <i>Handle THAT!</i>
       
   344 <?php } ?></td></tr>
       
   345 </table>
       
   346 
       
   347 <h4 id="faq">FAQ - Frequently asked questions</h4>
       
   348 
       
   349 <h5 id="generallybroken">Why doesn't the Exec-PHP plugin work as described here?</h5>
       
   350 <p>If the plugin does not work as described on this site although you <a href="#execute_php">configured your blog and user settings properly</a> then it is very likely that a different plugin is interfering with Exec-PHPs functionality. To boil things down, deactivate <em>all</em> other plugins beside Exec-PHP and see if the malfunction has gone away.</p>
       
   351 
       
   352 <h5 id="brokentag">Why does WordPress mess' up my <code>&lt;?php ?&gt;</code> tags after saving the article?</h5>
       
   353 <p><a href="http://en.wikipedia.org/wiki/Rtfm">RTFM</a>. <a href="#execute_php">Read this</a>.</p>
       
   354 
       
   355 <h5 id="evalerror">Why does the plugin fail with an <code>eval()</code> error when executing my code?</h5>
       
   356 <p>If you experience a PHP error message like <code>'Some error in /home/minime/htdocs/blog/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 666'</code> then it's time to repair your PHP code. If you are unsure where your code breaks, first run it in a separate file to punch out all bugs and afterwards copy the code into your article or widget. To reduce the noise in the <a href="http://bluesome.net/post/2005/08/18/50/#comments-50">comments section of the plugin homepage</a> I will delete all entries refering to this topic.</p>
       
   357 
       
   358 <h5 id="printcode">How can I just print out PHP code and don't execute it?</h5>
       
   359 <p>If you just want to print out code and don't want to execute it, e.g. like it is done here on this page, you have to make sure to convert your code to the correct XHTML representation. To do so you have to escape the following characters: <code>&lt;</code> to <code>&amp;lt;</code>, <code>&gt;</code> to <code>&amp;gt;</code> and <code>&amp;</code> to <code>&amp;amp;</code>. You can do this conversion in a semi automated fashion by using the <a href="http://www.village-idiot.org/archives/2006/04/09/wp-simplecode/">WP-Simplecode</a> plugin.</p>
       
   360 
       
   361 <h5 id="already_defined">Why does my newsfeed spits out parsing errors?</h5>
       
   362 <p>Assume your code is working outside an article. The PHP parser may still spit out error messages in your newsfeed but not if you are viewing your article even if everything seems to be correct. This will happen if you have defined your own functions, classes, etc. For the newsfeeds WordPress will read the content of each article twice (once for the summary and once for the whole article) and so causing the PHP code to be executed twice. For example the following code in your article would work if you view the article on your webpage but would cause your newsfeed to break:</p>
       
   363 <p>Article:</p>
       
   364 <pre><code code-lang="php">&lt;?php
       
   365 function hello()
       
   366 {
       
   367   echo 'Hello World';
       
   368 }
       
   369 hello();
       
   370 ?&gt;</code></pre>
       
   371 <p>As a general rule I would advise to separate all definitions into a file and reference to it by calling <code>require_once()</code>. So the above example would be split into two parts, your article and a file.</p>
       
   372 <p>Article:</p>
       
   373 <pre><code code-lang="php">&lt;?php
       
   374 require_once(ABSPATH. 'example.php');
       
   375 hello();
       
   376 ?&gt;</code></pre>
       
   377 <p>File (here example.php):</p>
       
   378 <pre><code code-lang="php">&lt;?php
       
   379 function hello()
       
   380 {
       
   381   echo 'Hello World';
       
   382 }
       
   383 ?&gt;</code></pre>
       
   384 <p>Please note that <code>require_once()</code> is using a fully qualified path. This is mandatory because depending on the context of the viewer a relative path would point to different locations e.g. for viewing your main blog page, viewing a single post, viewing the newsfeed, etc.</p>
       
   385 
       
   386 <h5 id="globals">Why does my included PHP file causes parsing errors?</h5>
       
   387 <p>Assume your included code is working outside an article and the path to the include file is correct. The PHP parser may still spit out error messages even if everything seems to be correct. This can happen when your included file assumes it runs on global scope level and does not use the keyword <code>global</code> to declare its global variables. As example create a new article with the following code:</p>
       
   388 <p>Article:</p>
       
   389 <pre><code code-lang="php">&lt;?php require_once(ABSPATH. 'example.php'); ?&gt;</code></pre>
       
   390 <p>After that copy the following code into a new file named <code>example.php</code> and store it in your webservers root directory:</p>
       
   391 <p>File (here example.php):</p>
       
   392 <pre><code code-lang="php">&lt;?php
       
   393 $g_text = 'Hello World';
       
   394 function hello()
       
   395 {
       
   396   global $g_text;
       
   397   echo $g_text;
       
   398 }
       
   399 hello();
       
   400 ?&gt;</code></pre>
       
   401 <p>Although the file <code>example.php</code> will execute fine if you just access the file directly, this test will end up in unexpected behaviour because assigning a value to the <code>$g_text</code> variable hasn't taken place in global scope in terms of the used WordPress hook to execute your code. This is because of how WordPress works and there is no way to handle this in the plugin. You can work around this problem by adding the following PHP code into your post before the include statement or into the file you want to include at the very beginning:</p>
       
   402 <pre><code code-lang="php">global $g_text;</code></pre>
       
   403 <p>No need to say, you have to do this for each global variable where this wasn't already done by the original programmer of the code. Another way would be to contact the original programmer and kindly ask him to change his code.</p>
       
   404 
       
   405 <h5 id="wordpressmu">Does the plugin works with WordPress MU?</h5>
       
   406 <p>WordPress is not WordPress MU. The plugin was written for WordPress but it may probably also work with WordPress MU. If you want to provide a patch to increase compatiblity with WordPress MU, I will be happy to incooperate it in the next official plugin release.</p>
       
   407 
       
   408 <h5 id="create_site">How do you create the plugin homepage?</h5>
       
   409 <p>Glad you've asked. This is a great use case to show you what can be achieved by the Exec-PHP plugin. The <a href="http://bluesome.net/post/2005/08/18/50/">plugin homepage</a> is basically a WordPress post running a PHP script thru Exec-PHP that reads and parses the readme.html that comes with the Exec-PHP installation. By that, when I release a new plugin version, I only have to upload the plugin files to the webserver. The documentation will be updated automatically on the plugin homepage. The complete code is:</p>
       
   410 <pre><code code-lang="php" set_header_type="GESHI_HEADER_NONE" start_line_numbers_at="3" enable_line_numbers="GESHI_TABLED_LINE_NUMBERS">&lt;?php
       
   411 // read readme.html depending on locale; plugin translation not yet loaded
       
   412 global $wp_version;
       
   413 if (version_compare($wp_version, '2.6.dev') >= 0)
       
   414   load_plugin_textdomain(ExecPhp_PLUGIN_ID,
       
   415     false, ExecPhp_HOMEDIR. '/languages');
       
   416 else
       
   417   load_plugin_textdomain(ExecPhp_PLUGIN_ID,
       
   418     ExecPhp_PLUGINDIR. '/'. ExecPhp_HOMEDIR. '/languages');
       
   419 
       
   420 $doc_dir = ExecPhp_HOME_URL. '/docs/';
       
   421 $doc_filename = ExecPhp_HOME_DIR. '/docs/'. __s('readme.html', ExecPhp_PLUGIN_ID);
       
   422 $content = file_get_contents($doc_filename);
       
   423 
       
   424 // strip HTML header
       
   425 $content = preg_replace('/^.*&lt;!\-\-\s*start of content\s*\-\-&gt;/is',
       
   426   '', $content);
       
   427 
       
   428 // strip HTML footer depending whether viewing the whole post or only
       
   429 // the excerpt
       
   430 $pattern = '/&lt;!\-\-\s*more\s*\-\-&gt;.*$/is';
       
   431 if (is_single())
       
   432   $pattern = '/&lt;!\-\-\s*end of content\s*\-\-&gt;.*$/is';
       
   433 $content = preg_replace($pattern, '', $content);
       
   434 
       
   435 // eval readme.html to generate output of test cases
       
   436 ob_start();
       
   437 eval(" ?&gt; $content &lt;?php ");
       
   438 $content = ob_get_contents();
       
   439 ob_end_clean();
       
   440 
       
   441 // adjust relative image links
       
   442 $content = preg_replace('/&lt;img\s+src\s*=\s*([\'\"])/is',
       
   443   '&lt;img src=\1'. $doc_dir, $content);
       
   444 $content = preg_replace('/&lt;a\s+href\s*=\s*([\'\"])\s*([^\1p]+\.png\s*\1)/isU',
       
   445   '&lt;a href=\1'. $doc_dir. '\2', $content);
       
   446 
       
   447 // done
       
   448 echo $content;
       
   449 ?&gt;</code></pre>
       
   450 
       
   451 <h3 id="past_present_future">Past, present and future</h3>
       
   452 
       
   453 <h4 id="new_versions">New versions</h4>
       
   454 <p>New versions may come out from time to time including new features or bugfixes. You can keep track of the plugins development by manually checking or subscribing to the <a href="http://bluesome.net/post/2005/08/18/50/#comments-50">comments</a>. Since WordPress 2.3 you will also be noticed about plugin upgrades through the 'Plugins' menu in WordPress.</p>
       
   455 <p>New releases will always justify the code and will cause the version number to be increased. Nevertheless the downloadable archive may change from time to time without having the version number to be increased. This will happen when the plugins documentation will be updated. In this case there will be no announcement on this site, because this may happen rather frequently.</p>
       
   456 
       
   457 <h4 id="history">History of older versions</h4>
       
   458 
       
   459 <h5 id="version_4_9">Version 4.9 (2009-01-07)</h5>
       
   460 <ul>
       
   461 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.zip">Plugin</a> (english and german translation)</li>
       
   462 	<li>Download: <a href="http://liseweb.fr/BLOG/?page_id=160">French translation</a></li>
       
   463 	<li>Download: <a href="http://gidibao.net/index.php/2008/05/07/exec-php-in-italiano/">Italian translation</a></li>
       
   464 	<li>Download: <a href="http://dimox.name/exec-php-russian-translation/">Russian translation</a></li>
       
   465 	<li>Download: <a href="http://dcabai.blogspot.com/2008/04/exec-php-en-espaol.html">Spanish translation</a></li>
       
   466 	<li>Download: <a href="http://www.wordthai.com/index.php?topic=34.0">Thai translation</a></li>
       
   467 	<li>Requirements: WordPress 2.0.11 or higher</li>
       
   468 	<li>Feature: Improved performance during loading admin interface</li>
       
   469 	<li>Feature: New 'Settings' link in WordPress 'Plugin' menu</li>
       
   470 	<li>Feature: WYSIWYG Conversion Warning now also displays for WordPress 2.0.11</li>
       
   471 </ul>
       
   472 
       
   473 <h5 id="version_4_8">Version 4.8 (2008-07-05)</h5>
       
   474 <ul>
       
   475 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.4.8.zip">Plugin</a> (english and german translation)</li>
       
   476 	<li>Download: <a href="http://liseweb.fr/BLOG/?page_id=160">French translation</a></li>
       
   477 	<li>Download: <a href="http://gidibao.net/index.php/2008/05/07/exec-php-in-italiano/">Italian translation</a></li>
       
   478 	<li>Download: <a href="http://dimox.name/exec-php-russian-translation/">Russian translation</a></li>
       
   479 	<li>Download: <a href="http://dcabai.blogspot.com/2008/04/exec-php-en-espaol.html">Spanish translation</a></li>
       
   480 	<li>Download: <a href="http://www.wordthai.com/index.php?topic=34.0">Thai translation</a></li>
       
   481 	<li>Requirements: WordPress 2.0 or higher</li>
       
   482 	<li>Feature: Support for WordPress 2.6 (relocation of wp-content)</li>
       
   483 </ul>
       
   484 
       
   485 <h5 id="version_4_7">Version 4.7 (2008-05-05)</h5>
       
   486 <ul>
       
   487 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.4.7.zip">Plugin</a> (english and german translation)</li>
       
   488 	<li>Download: <a href="http://liseweb.fr/BLOG/?page_id=160">French translation</a></li>
       
   489 	<li>Download: <a href="http://gidibao.net/index.php/2008/05/07/exec-php-in-italiano/">Italian translation</a></li>
       
   490 	<li>Download: <a href="http://dimox.name/exec-php-russian-translation/">Russian translation</a></li>
       
   491 	<li>Download: <a href="http://dcabai.blogspot.com/2008/04/exec-php-en-espaol.html">Spanish translation</a></li>
       
   492 	<li>Requirements: WordPress 2.0 or higher</li>
       
   493 	<li>Bugfix: For PHP4 the cache instance wasn't a reference, which was a bug but did not cause any known issues</li>
       
   494 	<li>Bugfix: Now Javascript works with single quotes for translated text</li>
       
   495 	<li>Feature: Increased performance for AJAX call</li>
       
   496 	<li>Feature: Better localization support inside of the plugin and the readme</li>
       
   497 </ul>
       
   498 
       
   499 <h5 id="version_4_6">Version 4.6 (2008-04-06)</h5>
       
   500 <ul>
       
   501 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.4.6.zip">Plugin</a> (english and german translation)</li>
       
   502 	<li>Download: <a href="http://liseweb.fr/BLOG/?page_id=160">French translation</a></li>
       
   503 	<li>Download: <a href="http://dimox.name/exec-php-russian-translation/">Russian translation</a></li>
       
   504 	<li>Download: <a href="http://dcabai.blogspot.com/2008/04/exec-php-en-espaol.html">Spanish translation</a></li>
       
   505 	<li>Requirements: WordPress 2.0 or higher</li>
       
   506 	<li>Feature: In case of AJAX error retry call at most three more times</li>
       
   507 	<li>Bugfix: Making Exec-PHP configuration menu valid XHTML</li>
       
   508 </ul>
       
   509 
       
   510 <h5 id="version_4_5">Version 4.5 (2008-03-24)</h5>
       
   511 <ul>
       
   512 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.4.5.zip">Plugin</a> (english and german translation)</li>
       
   513 	<li>Download: <a href="http://liseweb.fr/BLOG/?page_id=160">French translation</a></li>
       
   514 	<li>Download: <a href="http://dimox.name/exec-php-russian-translation/">Russian translation</a></li>
       
   515 	<li>Download: <a href="http://dcabai.blogspot.com/2008/04/exec-php-en-espaol.html">Spanish translation</a></li>
       
   516 	<li>Requirements: WordPress 2.0 or higher</li>
       
   517 	<li>Bugfix: Fixing WordPress 2.1.x compatibility</li>
       
   518 	<li>Bugfix: WYSIWYG Conversion Warning now displays correctly for pages, too</li>
       
   519 	<li>Change: Performance optimization during plugin initialization</li>
       
   520 	<li>Change: Nonintrusive AJAX error display</li>
       
   521 	<li>Feature: Plugin interface support for WordPress 2.5</li>
       
   522 </ul>
       
   523 
       
   524 <h5 id="version_4_4">Version 4.4 (2008-01-29)</h5>
       
   525 <ul>
       
   526 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.4.4..zip">Plugin</a> (english and german translation)</li>
       
   527 	<li>Download: <a href="http://liseweb.fr/BLOG/?page_id=160">French translation</a></li>
       
   528 	<li>Download: <a href="http://dimox.name/exec-php-russian-translation/">Russian translation</a></li>
       
   529 	<li>Requirements: WordPress 2.0 or higher</li>
       
   530 	<li>Bugfix: Incompatibilites with WP-Shopping-Cart because of Javascript global variable clash</li>
       
   531 	<li>Change: New directory structure</li>
       
   532 </ul>
       
   533 
       
   534 <h5 id="version_4_3">Version 4.3 (2007-12-11)</h5>
       
   535 <ul>
       
   536 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.4.3.zip">Plugin</a> (english and german translation)</li>
       
   537 	<li>Download: <a href="http://liseweb.fr/BLOG/?page_id=160">French translation</a></li>
       
   538 	<li>Download: <a href="http://dimox.name/exec-php-russian-translation/">Russian translation</a></li>
       
   539 	<li>Requirements: WordPress 2.0 or higher</li>
       
   540 	<li>Bugfix: Requirements lowered to WordPress 2.0 or higher</li>
       
   541 	<li>Bugfix: Delay loading of text translations to support language switching plugins</li>
       
   542 	<li>Feature: The WYSIWYG Conversion Warning can now be turned off through the Profile menu of the user</li>
       
   543 </ul>
       
   544 
       
   545 <h5 id="version_4_2">Version 4.2 (2007-11-03)</h5>
       
   546 <ul>
       
   547 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.4.2.zip">Plugin</a> (english and german translation)</li>
       
   548 	<li>Download: <a href="http://liseweb.fr/BLOG/?page_id=160">French translation</a></li>
       
   549 	<li>Requirements: WordPress 2.2 or higher</li>
       
   550 	<li>Change: Remodeling the Information section of the plugin configuration menu</li>
       
   551 	<li>Feature: Showing security alarms in the Information section of the plugin configuration menu</li>
       
   552 	<li>Feature: A warning will be printed on the 'Write' and the 'Widgets' menu in case blog or user settings will screw up written PHP code during saving the article or widgets</li>
       
   553 </ul>
       
   554 
       
   555 <h5 id="version_4_1">Version 4.1 (2007-10-27)</h5>
       
   556 <ul>
       
   557 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.4.1.zip">Plugin</a> (english and german translation)</li>
       
   558 	<li>Download: <a href="http://liseweb.fr/BLOG/?page_id=160">French translation</a></li>
       
   559 	<li>Requirements: WordPress 2.2 or higher</li>
       
   560 	<li>Bugfix: Display of the Exec-PHP configuration menu was restricted by an inappropriate capability</li>
       
   561 	<li>Bugfix: Making Exec-PHP configuration menu valid XHTML</li>
       
   562 	<li>Feature: The Exec-PHP configuration menu now displays which user is allowed to write and execute PHP. Display of this list is executed with AJAX. Therefore even for large WordPress installations with many users, the time to load the Exec-PHP configuration menu will still be satisfiying</li>
       
   563 </ul>
       
   564 
       
   565 <h5 id="version_4_0">Version 4.0 (2007-10-25)</h5>
       
   566 <ul>
       
   567 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.4.0.zip">Plugin</a></li>
       
   568 	<li>Requirements: WordPress 2.0 or higher</li>
       
   569 	<li>Bugfix: When the blog administrator removes the 'exec_php' capability from all roles, the plugin will not reassign the capability to the Administrator and Editor roles</li>
       
   570 	<li>Change: For new plugin installations only the Administrator role will be eligable to execute PHP code</li>
       
   571 	<li>Feature: Configurable execution of PHP code in text widgets through the Exec-PHP configuration menu. This will only work with native widgets support introduced in WordPress 2.2 or higher</li>
       
   572 </ul>
       
   573 
       
   574 <h5 id="version_3_4">Version 3.4 (2007-10-08)</h5>
       
   575 <ul>
       
   576 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.3.4.zip">Plugin</a></li>
       
   577 	<li>Requirements: WordPress 2.0 or higher</li>
       
   578 	<li>Feature: Now supports execution of code in text widgets</li>
       
   579 	<li>Feature: Now supports plugin upgrade notification through the 'Plugins' menu of WordPress by listing it in the <a href="http://wordpress.org/extend/plugins/exec-php/">official WordPress plugin repository</a></li>
       
   580 </ul>
       
   581 
       
   582 <h5 id="version_3_3">Version 3.3 (2007-08-11)</h5>
       
   583 <ul>
       
   584 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.3.3.zip">Plugin</a></li>
       
   585 	<li>Bugfix: Removing spaces around PHP code</li>
       
   586 	<li>Bugfix: Removing obsolete plugin hooks for WordPress 1.x</li>
       
   587 </ul>
       
   588 
       
   589 <h5 id="version_3_2">Version 3.2 (2007-02-10)</h5>
       
   590 <ul>
       
   591 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.3.2.zip">Plugin</a></li>
       
   592 	<li>Bugfix: Removing obsolete config interface hooks</li>
       
   593 </ul>
       
   594 
       
   595 <h5 id="version_3_1">Version 3.1 (2007-02-09)</h5>
       
   596 <ul>
       
   597 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.3.1.zip">Plugin</a></li>
       
   598 	<li>Bugfix: Removing tag style converter because a) it caused a serious slow down in the WordPress admin interface and b) PCRE proved to be very buggy and unreliable. Note for myself: Never use PCRE again!</li>
       
   599 	<li>Feature: Adding internationalization (just to be complete)</li>
       
   600 	<li>Feature: Now works in RSS feeds</li>
       
   601 </ul>
       
   602 
       
   603 <h5 id="version_3_0">Version 3.0 (2006-08-06)</h5>
       
   604 <ul>
       
   605 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.3.0.zip">Plugin</a></li>
       
   606 	<li>Feature: Removing all alternative PHP tag styles like <code>&#91;?php ?&#93;</code> and <code>&lt; ?php ?&gt;</code>, because regex was buggy and to tough to support</li>
       
   607 	<li>Feature: Removing support for WordPress 1.x, because regex was buggy and to tough to support</li>
       
   608 	<li>Feature: Moving plugin files to plugins subdirectory</li>
       
   609 	<li>Feature: Adding tag style converter</li>
       
   610 	<li>Feature: Adding support for excerpt field</li>
       
   611 	<li>Bugfix: Because of changes to PHP tag handling, the bug reported in comment 84 is fixed</li>
       
   612 </ul>
       
   613 
       
   614 <h5 id="version_2_0">Version 2.0 (2005-12-22)</h5>
       
   615 <ul>
       
   616 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.2.0.zip">Plugin</a></li>
       
   617 	<li>Feature: For WordPress 2.0 execution of PHP is now restricted to Administrators or Editors</li>
       
   618 	<li>Feature: Supporting alternative PHP tags <code>&#91;?php ?&#93;</code></li>
       
   619 </ul>
       
   620 
       
   621 <h5 id="version_1_2">Version 1.2 (2005-12-04)</h5>
       
   622 <ul>
       
   623 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.1.2.zip">Plugin</a></li>
       
   624 	<li>Bugfix: Reparing issue with reopening PHP tags (Test #16)</li>
       
   625 </ul>
       
   626 
       
   627 <h5 id="version_1_1">Version 1.1 (2005-08-19)</h5>
       
   628 <ul>
       
   629 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.1.1.zip">Plugin</a></li>
       
   630 	<li>Bugfix: Escaped string delimiters in PHP strings are now parsed correctly</li>
       
   631 </ul>
       
   632 
       
   633 <h5 id="version_1_0">Version 1.0 (2005-08-18)</h5>
       
   634 <ul>
       
   635 	<li>Download: <a href="http://bluesome.net/data/2005/08/exec-php.1.0.zip">Plugin</a></li>
       
   636 	<li>Feature: Allows <code>&lt;?php ?&gt;</code> tags inside your articles to execute the code inside of it</li>
       
   637 </ul>
       
   638 
       
   639 <h4 id="roadmap">Roadmap</h4>
       
   640 <p>At the moment it is not planned to include any further features into the plugin but you can add a <a href="http://bluesome.net/post/2005/08/18/50/#response-50">comment</a> to request further features.</p>
       
   641 <!-- end of content -->
       
   642 
       
   643 </body>
       
   644 </html>