WordPress.org

Support

Support » Plugins and Hacks » Brown Paper Tickets » [Resolved] Error Activating plugin

[Resolved] Error Activating plugin

  • The plugin renders this error:

    Parse error: syntax error, unexpected T_VAR, expecting ‘;’ in /*dirremoved*/public_html/websitedir/wp-content/plugins/brown-paper-tickets/src/modules/calendar/calendar-widget.php on line 181

    Any ideas/thoughts?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Brown Paper Tickets

    @chandler-blum

    I’ve seen this issue before where PHP tries to parse the underscore html template for the calendar widget as PHP code but was never able to figure it out. Which version PHP are you running and on which OS?

    Thanks

    It was 5.3, but I just changed it to 5.5, and 5.6 does the same thing.

    Was running older version of wordpress, but updated to 4.6.1 still has the same error.

    Site has very few plugins: Only Updraft, Advanced CSS editor (installed after error was produced for unrelated reasons) and Contact Form 7. None of these should be causing any issues as they’re well maintained, unrelated, and/or minor. All are up to date.

    Platform Type Debian (not sure about version number, could poke around more to find it I bet)
    PHP Version 5.6

    When you say it was related when parsing “underscore html template”, do you mean the bit of html after the closing code in the PHP file? It does seem like that’s the issue as line 181 is a var that’s after the closing php code. Not sure how that works, but it does seem to be the issue.

    Perhaps another crack? Maybe I’ll read-up though I’m like 90% lay when it comes to php.

    Plugin Author Brown Paper Tickets

    @chandler-blum

    I think I’ve found the issue.

    It seems like PHP has an ASP short tags feature which I’m guessing is enabled in your environment. It’s why PHP is reading <% as a PHP tag.

    According to the PHP documentation, you can set asp_tags to 0 in your php.ini to disable it (It’s also been entirely removed from PHP 7).

    Let me know if that works for you.

    That worked indeed! Thanks for the awesome support! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar