• Hi,

    I have been successfully using the Insert PHP plugin for about 18 months and it is very useful.
    I have, however, hit a problem.
    I seem to have a limitation.
    I have about 650 lines of code on a single WordPress page.
    It is all written in php and it works perfectly well.
    However, I need to add more logic to the page.
    When I add a new If statement with a few lines of code, I just get a blank page.
    It is not the code itself, as I can duplicate existing code and I get the same issue.
    I have tried adding more memory to my dedicated server (via php.ini), but this had made no difference.
    I was under the impression, that Insert PHP had no limit, but it seems that I have hit it.
    Can anyone suggest a work around please, or a solution?

    Thanks in advance.
    Mike from the UK.

Viewing 1 replies (of 1 total)
  • Hi Mike,

    I assume you viewed the error logs to determine the out-of-memory condition. If not, do have a look. It might be something entirely different.

    If your new code doesn’t have a loop and doesn’t call code containing a loop, the memory increase should have solved it for you. Loops, if they refer to values that aren’t present or are different than the test server had, could become infinite, which is likely to cause an out-of-memory condition regardless how much memory is available.

    The error logs should tell you which line of code was being executed when the out-of-memory condition occurred. With that, the cause may be easier to track down.

    Insert PHP uses the PHP eval() function to run the PHP code. Any limitations Insert PHP might have would be limitations of the eval() function.

    Try putting your code into a test.php file like:

    <?php 
    $code = <<<CODECHUNK 
    /* The Insert PHP code goes here (without the [insert_php] tags) */ 
    CODECHUNK; 
    eval( $code ); 
    ?>

    That is a close simulation of what happens inside Insert PHP.

    Warnings could be turned on so the error log also records warnings, which may make it easier to find out what exactly is going on. This page describes how to read the error messages spawned when Insert PHP is running.

    http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#errormessages

    Will

    • This reply was modified 9 years, 4 months ago by WillBontrager.
Viewing 1 replies (of 1 total)

The topic ‘Out of space using Insert PHP.’ is closed to new replies.