• Hi

    At random and for no reason I can see several pages on this website lose their php code from the PHP Everywhere box on the right hand side.

    I am running Wordfence but cannot find anything about codes being deleted. I see several other topics regarding this but none of them have answers and are closed.

    Can you please help with this issue?

    Paul

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter rycom

    (@rycom)

    Why don’t you respond to any support issues?

    I might have been having the same problem as you, so here’s what I found I had to do to fix it.
    I have pages with working php_everywhere code embedded, and I’ve been trying to update the embedded code. I can edit it on the page, and hit the ‘update’ button for the plugin, and the change appears to work – but when I save the changes to the page and view it, the original code is back.
    After a LOT of testing, I worked out that the changed PHP code was being written to the database correctly, and then being rewritten back to the previous version when the page was saved. This might have been cause by Wordfence, which is also running on the server.
    Try creating a new page with a php_everywhere plugin that just says <?php require_once(‘someFile.php’); ?> and create a file called someFile.php in the wordpress directory on your server. Then edit that file.
    In a worst case, find your site’s blog ID in wordpress, and go to the database. For a site with ID=2, you want to edit data in the table wp_2_postmeta. Look for a row with meta_key=php_everywhere, and edit the meta_value.
    It’s a very clunky workaround, but it works for me.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP code keeps being deleted’ is closed to new replies.