WordPress.org

Forums

Google Analytics by Yoast
[Plugin: Google Analytics for WordPress] Fatal error Parse error: syntax error, unexpected T_STRING (5 posts)

  1. ncsulilwolf
    Member
    Posted 3 years ago #

    Getting the following error when trying to re-activate the Google Analytics for WordPress plugin:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/content/l/u/c/luckybsbar/html/wp-content/plugins/google-analytics-for-wordpress/wp-gdata/wp-gdata.php on line 14

    Any thoughts, anyone? Thank you!

    http://wordpress.org/extend/plugins/google-analytics-for-wordpress/

  2. balduino
    Member
    Posted 3 years ago #

    I have the same problem here. Tried to run versions 4.2.2 and 4.2 of the plugin, however the same error still happening.

  3. balduino
    Member
    Posted 3 years ago #

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/content/l/u/c/luckybsbar/html/wp-content/plugins/google-analytics-for-wordpress/wp-gdata/wp-gdata.php on line 14

    Ok, I'm not sure, but I think this happens due our version of PHP. I'm running PHP 4.3.10.
    On the line 14 of the file wp-gdata.php you can see the declaration "public $http_code;". This is only supported in PHP 5.

    I suggest the author specifies on the plugin download page the minimum requirements to run this plugin, since I couldn't see anywhere the server's requirements.

    Thanks.

  4. x
    Member
    Posted 3 years ago #

    I have the same issue.

  5. Corinne
    Member
    Posted 3 years ago #

    I'm currently on 3.1.4 and I'm experiencing the same issues. I've set it as "broken" on the plugin page.

    Unfortunately, I can't update WordPress because the GoDaddy account only supports PHP 4.3. Oy.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics by Yoast
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic