Support » Plugin: Cryptocurrency Portfolio Tracker » Parse error: syntax error, unexpected:

  • Resolved mrliamborg

    (@mrliamborg)



    Hey, I have downloaded your plugin. I have click activate and it comes up with this error code:

    *** Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in /home/socialw1/public_html/wp-content/plugins/cryptocurrency/cryptocurrency.php on line 23 ***

    Is this the first time you have seen this? I have also tried to download the plugin on another two different sites of mine but it’s coming up with the same error code.

    Thanks
    Liam

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Mat Gargano

    (@matstars)

    Ah. I am willing to bet your host is using a version of PHP < 5.4

    PHP 5.3 stopped being supported on August 14, 2014 — can you see if your host will upgrade your PHP version?

    mrliamborg

    (@mrliamborg)

    I will get onto that now and give you an update when finished.

    Thanks

    mrliamborg

    (@mrliamborg)

    Hey Mat,

    I have got my hosting provider to upgraded my PHP version to 5.6
    The plugin still doesn’t work… what do you think the problem is?

    Thanks
    Liam

    Plugin Author Mat Gargano

    (@matstars)

    What’s the error now?

    mrliamborg

    (@mrliamborg)

    The error code is: “Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{‘ or ‘in/home/socialw1/public_html/wpcontent/plugins/cryptocurrency1/vendor/htmlburger/carbon-field-number/field.php on line 7”.

    Plugin Author Mat Gargano

    (@matstars)

    Ok I’ll take a look tomorrow and get back to you. This seems to be an issue with carbonfields which is a dependency and not my plugin directly.

    mrliamborg

    (@mrliamborg)

    Thank you.

    Speak soon!

    Plugin Author Mat Gargano

    (@matstars)

    Can you confirm your version of PHP and phpinfo by installing https://wordpress.org/plugins/wordpress-php-info/ and emailing me the results? Read the plugins FAQ. My email is my mgargano plus at symbol plus gmail d0t com

    I ask this because – https://carbonfields.net/faq/ scroll down to errors and issues

    I keep getting a “Parse error: syntax error, unexpected T_STRING” error. How can I fix it?
    You’re probably using PHP 5.2 or older. The Carbon Fields library uses PHP namespaces, which are only supported in PHP 5.3+.

    mrliamborg

    (@mrliamborg)

    Hi Mat,

    I have emailed you.
    I downloaded the PHP plugin and it says: ***PHP Version: 5.6.33***

    Thanks
    Awaiting your reply.

    Have something similar related to Carbon Field in this plugin: Cant activate plugin because of fatal error:

    Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{‘ or ‘$’ in /var/www/qb108104/data/www/davidriupassa.net/wp-content/plugins/cryptocurrency/vendor/htmlburger/carbon-field-number/field.php on line 7

    I am on PHP version 5.4.45

    • This reply was modified 6 months, 2 weeks ago by  daverius. Reason: added php version
    Plugin Author Mat Gargano

    (@matstars)

    PHP 5.4 is end of lifed (see http://php.net/supported-versions.php) any way to get it on a newer PHP?

    I’ll give it a try. Thanks!

    Updated to PHP version 7.1. Works fine now.

    Plugin Author Mat Gargano

    (@matstars)

    Awesome! Great to hear.

    Plugin Author Mat Gargano

    (@matstars)

    marking as resolved.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Parse error: syntax error, unexpected:’ is closed to new replies.