Support » Plugin: Official Facebook Pixel » Parse error: syntax error, unexpected ‘class’…..

  • Resolved terislater

    (@terislater)


    Plugin update gives me this error. My whole site has crashed, and I can’t rollback the plugin because I can’t get into my wordpress admin either! Please HELP.

    Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{‘ or ‘$’ in /home3/teri1975/public_html/wp-content/plugins/official-facebook-pixel/integration/FacebookWordpressIntegrationBase.php on line 38

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Teri, I had started the other thread that I then closed. This is what I did:
    Disable plugins from cpanel:
    https://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/

    Then go back into your admin dashboard and re-enable plugins.

    However I found the issue to be that the PHP version we were running is no longer supported by this plugin. We updated to 5.6 (stable). That solved the issue.
    In fact when we started to re-enable all the plugins, we found that there were a number that were throwing errors due to the PHP version.

    This plugin needs to update their docs though, it clearly states that it is supported in PHP version 5.3 and up. That’s clearly not the case.

    Thanks. To be honest, your reply is a little over my head – I have no idea how to update PHP (or even how to know what version mine is).

    To help others: I went into my cPanel and deleted the plugin file from my wp content>plugins folder. After I did that, all access was restored. I guess now I don’t have the plugin, but it seems my site is still running the pixel. I’m just going to leave it for now. Thanks @alissit for the link to access the admin, I’ll save that for future use!

    Terislater: Go into your cPanel, go to Software or Advanced and choose ‘PHP Selector’ here there is a dropdown where you can choose between the different PHP versions. If you switch from 5.4 to 5.6 it should be solved. Then you can log into your backend and install the Facebook Pixel plugin again and it will work like a charm. I did this, it worked for me and changing PHP version will have no effect on your site and you can always switch back to 5.4 if it has.

    Thanks!!

    Plugin Author Facebook

    (@facebook)

    Hi,

    Thanks for reaching out and flagging this. We have fixed that to support PHP 5.3+ and please update the latest plugin.

    Thanks!

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