First off id like to explain the title. “I hate cool plugins that are badly documented” is at the very top of the doccumentation of the Exec PHP plugin, i think that Sören (Author of the Doccumentation) was being ironic when he put this, because the doccumentation has a long way to go before it becomes good or even bad… its by far the worst doccumentation ive ever read. I think it should be called Maze of Red Herrings, Poor Examples and Regret, while the idea of Exec PHP is good and powerful, the application in practice isnt very good and is full of loop holes whereby you end up changing settings or installing plugins which affect your whole blog. Sören’s own website kinda gives you an insight into what your going to be in for if your thinking of installing this plugin. Yeah thats right, Errors, Errors and more Errors.
EXEC PHP - Continued from here
I have spent the last 5 hours (maybe more!) looking at PHP and this plugin to try and get the Tic Tac Toe applicaiton to work as a post within my blog. I did the usual download, unzip, upload and activate, but as discussed in my previous post i kept getting an error message which mentioned that all the php code would be rendered useless.
SO, i followed ALL four suggestions from the doccumentation, in hope that they would work.
These suggestions were:
- Disable tag balancing ‘WordPress should correct invalidly nested XHTML automatically’ through the ‘Settings > Write’ menu in WordPress
- Disable the WYSIWYG editor in the user’s settings through the ‘Users > Your Profile’ menu
- Assign the ‘unfiltered_html’ capability to the user
- Assign the ‘exec_php’ capability to the user
I will now explain each one in “simple” terms and what they really do (or atleast in my case).
Disable tag balancing ‘WordPress should correct invalidly nested XHTML automatically’ through the ‘Settings > Write’ menu in WordPress
The terminology of this is wrong, according to my blog, you need to go to Options > Writing and then uncheck the box which should look like the image below.

Disable the WYSIWYG editor in the user’s settings through the ‘Users > Your Profile’ menu
This is correct, you have to go to Users > Your Profile and uncheck the box which is shown below.

Once you uncheck this box, update the page and wave goodbye to the wonderfull WYSIWYG editor that you know and love, you will want it back! But for now atleast you have to turn it off!
Assign the ‘unfiltered_html’ capability to the user & Assign the ‘exec_php’ capability to the user
For this you have to install a seperate plugin called Role-Manager which gives you more control over your administration. If that website confuses you then the direct link is here, just do the usual download, unzip, upload and activate and this one works fine. This plugin should atomatically assign the ‘unfiltered_html and exec_php capabilities to the admin role, so as long as your logged in as admin then your good to go!
Once this is all done you should be able to post PHP into your blog. I tried two different examples, Tic Tac Toe was the first one. This was just me copying the code from the original “index.php” file, from the lesson into one of my posts. It didnt work. I eventually realised it was because the php of this file was written so that it was its own doccument, and was not meant to be called anywhere. So i edited the code and the eventually got something working! The script part of the code stops the rest of the page from functioning however without it the game does not properly render. So its either one or another! Below are 2 images of the Tic Tac Toe game.

= The above image shows the fully functioning Tic Tac Toe game, but half of the blog does not load. =

= The above image shows what happens when the code is rendered useless. =
I have had a look at PHP examples by searching Google and looking at W3Schools. Have a look for yourself because you never know what youll learn!
Please check out my Tic Tac Toe Page to see the game in action (if the plugin lets you) otherwise you can see it in the old post here. To see a working example of Exec PHP with simpler code, check out my Seasons Page.