Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WillBontrager

    (@willbontrager)

    Thanks, sagive.

    Post the PHP code you’re using with Insert PHP. It might give me a clue to where to start the search.

    Will

    Hi Will Bontrager,

    I’ve exactly the same error with login form like

    [insert_php] php wp_login_form(); [/insert_php]

    error : Parse error: syntax error, unexpected T_STRING in /wp-content/plugins/insert-php/insert_php.php(48) : eval()’d code on line 1

    Thanks for your help,
    have a good day ! 🙂

    Plugin Author WillBontrager

    (@willbontrager)

    fabi.b, in your case, php wp_login_form(); is invalid PHP code.

    Try this on a separate PHP web page:

    <?php
    php wp_login_form();
    ?>

    Your error log will give you a better error message than Insert PHP will.

    Actually, just

    <?php
    wp_login_form();
    ?>

    (without the “php” part of the line) most likely won’t work, either.

    Insert PHP doesn’t have access to variables and such outside its own code block. See
    http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#functionscope
    for more info about that.

    The above “separate PHP web page” technique is a very good way to test the code before using it in Insert PHP. You get better error messages and, once it passes on your separate PHP web page, it should work just fine in Insert PHP.

    Will

    Plugin Author WillBontrager

    (@willbontrager)

    sagive, I’m assuming you figured out what part of your code was causing the error because there was no response from you to this thread.

    For others who may consult this thread, the page at the following URL has information about error messages and how to deal with them:

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

    Will

    Hi Will,

    It’s right, this code is Ok :
    [insert_php]wp_login_form();[/insert_php]

    thanks for your help
    Fabi

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP error…’ is closed to new replies.