• Hi, im kind of a WP noob, so this may be fixable with some option that I overlooked or something.

    I’m using a plugin called runPHP, which is supposed to execute PHP code in your posts and pages. I have it all installed and activated and working fine with one exception.

    Whenever I post PHP code, WordPress filters it and replaces special characters with HTML codes.

    For example, if I use “>” as an operator in PHP, WP replaces it with “>” which causes some errors in the PHP.

    The only way I have to insert unfiltered PHP is to directly edit my mySQL DB, which is fine for now, but isn’t going to fly if i get more authors.

    I am fine with modifying it so that it doesn’t filter my posts like that at all, I just don’t know how to do it.

    P.S: Yes, I am using the “code” tab to enter my PHP code.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    I use the Exec-PHP plugin myself but have had this problem too.

    The solution is to go to the My Profile link in your dashboard (top right of the page), turn off the “Use the visual editor when writing” option (make it un-checked) and save your profile.

    Once that is done then you should be able to embed PHP code.

    Embedding PHP code into your posts won’t work even using the “Code” tab in the editor (as you have found out).

    I only embedded PHP in pages and not posts. So doing this with a page that I only change once in a blue moon works for me. For posts I turn the visual editor back on.

    @jdembowski:

    Thanks for the link to Exec-PHP, I just tried it with WP 2.2.1 and it works just fine in my posts.

    I’m just using it so I can code all my hyperlinks with get_bloginfo() it makes site cloning much easier.

    Great stuff, my workflow is now much more elegant ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP Messes up PHP when using the runPHP plugin’ is closed to new replies.