• Resolved mcplaty

    (@mcplaty)


    Server running PHP 5.3.29

    Had WP 4.x, upgraded all my plugins, then upgraded to WP 5.0. Immediately after upgrading, entire site goes down (500), logs:

    Fri Dec 07 16:37:44 2018] [error] [client 10.149.176.62] PHP Parse error: syntax error, unexpected ‘[‘ in /mnt/site_root/emtheme/wp-content/plugins/better-click-to-tweet/assets/block/init.php on line 31

    Removing plugin allows site to load normally.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Ben Meredith

    (@benmeredithgmailcom)

    Hi @mcplaty

    That’s no good!

    I’ve extensively tested on WordPress 5.0 in the two weeks there have been “stable” releases for me to test on, and I am not seeing this behavior.

    My first guess would be that this is related to the version of PHP that you are running on the site. Do you by chance know what version of PHP you are running? There are several plugins in the directory that you can use to determine your PHP version.

    I’m at a conference this week, but will work to see if I can resolve this from my side by making the code backward compatible to whatever version of PHP you are using. But the fastest way would be for you to have your web host update everything to PHP 7.1

    Thanks!

    Thread Starter mcplaty

    (@mcplaty)

    I suspect it’s the PHP version as well, that’s why I noted it. It’s PHP 5.3.29. Unfortunately it’s not feasible for us to upgrade at this moment, so any guidance on getting it to work on PHP 5 would be ideal. Otherwise, we’ll work on getting PHP upgraded.

    @mcplaty, looks like short array syntax (a.k.a. []) is not supported in PHP 5.3.29 but on PHP 5.4.
    I think @benmeredithgmailcom could change it to use the normal syntax and it will still be still backward compatible.

    • This reply was modified 5 years, 11 months ago by Walter Lopez.
    Plugin Author Ben Meredith

    (@benmeredithgmailcom)

    Hi @mcplaty

    Sorry, in my haste reading the post earlier I completely missed the fact that you kinda LED with the PHP version.

    I just pushed out version 5.6.4 which should resolve this issue for you.

    But if I were you, I would DEFINITELY look into updating your PHP version. 5.3 is critically old, and it’s worth it to get to a more modern version. Speed improvements, less risk of n00b developers doing rookie mistake moves like this, etc. ??

    Have a great day, and let me know if you are still experiencing issues.

    Thanks!

    • This reply was modified 5 years, 11 months ago by Ben Meredith. Reason: it's not a ticket, BEN
    Thread Starter mcplaty

    (@mcplaty)

    Wow, thanks a ton Ben. I agree re: PHP version, unfortunately there are many hands in this pot, and mine aren’t the biggest ??

    Really appreciate this, love the plugin. I’ll give it a go on Monday (too late to tempt fate on a Friday).

    Thread Starter mcplaty

    (@mcplaty)

    Worked like a charm, thanks again!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin causes WP 5.0 to 500 error’ is closed to new replies.