Forum Moderators: coopster

Message Too Old, No Replies

PHP WordPress Issue

         

Brett_Tabke

2:34 pm on May 18, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Installed "exec php" wordpress plugin to execute php code in posts and pages. It works in stock "posts", however I can't get it to work in "pages".

We have %postname% turned for pretty urls. Could that be the issue?

Seems like I am missing something about the way PHP is called in this situation. This ring a bell with anyone? (be gentle: remember, I am a perl guy ;-)

Frank_Rizzo

3:41 pm on May 18, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I had a few problems with the php opening tags being converted. If viewing a previous html code editor page in the wysiwyg editor page it would add a space between the < and the ? in <?php

Had to go manually edit the files and change all < ?php to <?php

Brett_Tabke

8:48 pm on May 18, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Thanks Frank. Running one of the mods that turn off the visual editor and uses pure html. So that wasn't it.

Looks like it is something to do with using a custom structure for permalinks.

Brett_Tabke

2:25 am on May 24, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Thanks for the help from a couple of senior members here, we finally figured it out.

I was running into a mod rewrite condition from wordpress that was not executing the script.

RewriteCond %{REQUEST_FILENAME} !-d

Which caused stuff at the doc root file level to work, but not at the directory level. It just so happened that the directory name DID exist. (so it matched a category in the wordpress slug... argh)