• Parse error: syntax error, unexpected ‘?’, expecting end of file in /wp-content/plugins/insert-php-code-snippet/shortcode-handler.php(29) : eval()’d code on line 1

Viewing 5 replies - 1 through 5 (of 5 total)
  • There must be an error in the snippet you’ve created. Please recheck the code.

    wan1402

    (@wan1402)

    @palmettoinfusion : do you have your codes begin with PHP tag?
    <?php — ?>

    I have an exact issue…same error.
    I have <?php — ?>tags.

    I just installed the plugin a few minutes ago and had the same parse error. It happened because I posted the code with the tags and it appears that the plugin adds also, so under the snippet I had added (after hitting the edit icon), I saw
    <?php
    <?

    I removed the short tag and its working. My bad for including the tags, its a natural action.

    • This reply was modified 6 years, 8 months ago by sourcespin.

    Had the same problem and tried a million different things.
    What worked for me was commenting out the “<?php” tag instead of removing it.

    It ends up looking like this:
    //<?php
    [the php code]
    ?>

    Hope it helps.

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