Exec-php and WP-Syntax Caveat


This post was originally published in 2009
It may contain stale & outdated information. Or it may have grown more awesome with age, like the author.

While migrating my blog articles from Rapidweaver to WordPress I stumbled across some rather odd behaviour. All posts in http://pagesofinterest.net/blog/2008/06/ were displaying a garbled version of a particular post in that directory. The bottom of each affected post had the following php error message:

Fatal error: Call to undefined function insert_comment() in /home/pagesofi/public_html/wordpress/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 131

After much investigation, I narrowed it down to one thing – Exec-php and WP-Syntax battling for control.

Exec-php was attempting to execute the line below, when there was no whitespace between

<? and php

For example:

<? php insert_comment("","","http://pagesofinterest.net/mikes/blog_of_interest_files/fancy_footer.php","Fancy Footer - Usage and Tips","","Like these snippets?  Leave a comment!",""); ?>

Obviously, I can’t show you the code that causes the craziness.

Keep this in mind if you’re also using these plugins together. If you do run into this problem, open the post that is causing it for editing, and copy its entire contents into a text editor. Paste each line into the WordPress edit text area, and press save, then view the post. Continue until you see the above error. Fix this line, then continue down the post. The point of this is to find each line that causes this error, and to fix it.

No comments | Trackback