Title: Parse error
Last modified: August 23, 2019

---

# Parse error

 *  Resolved [academyadmin](https://wordpress.org/support/users/academyadmin/)
 * (@academyadmin)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/parse-error-519/)
 * When trying to activate the plugin, I’m getting:
 * Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier(
   T_STRING) or variable (T_VARIABLE) or ‘{‘ or ‘$’ in …/wp-content/plugins/cf7-
   gated-content/cf7_gated_content.php on line 31
 * I should mention that this works for me in localhost and only fails on production
   server.
 * WordPress version is the same in both scenarios (WordPress 4.9.10) and as well
   for the plugin (Version 1.4.3).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [academyadmin](https://wordpress.org/support/users/academyadmin/)
 * (@academyadmin)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/parse-error-519/#post-11859684)
 * This was a php version issue. Had to contact the hosting provider and ask them
   to upgrade the php version on my production server.
 * Hope it helps anyone.
 * Thanks.
 *  Thread Starter [academyadmin](https://wordpress.org/support/users/academyadmin/)
 * (@academyadmin)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/parse-error-519/#post-11859685)
 * Resolving thread.
 *  Plugin Author [Wyatt Kirby](https://wordpress.org/support/users/odisant/)
 * (@odisant)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/parse-error-519/#post-11860959)
 * [@academyadmin](https://wordpress.org/support/users/academyadmin/) What version
   of PHP were you using? We can at least update to give a much more helpful error
   message.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Parse error’ is closed to new replies.

 * ![](https://ps.w.org/cf7-gated-content/assets/icon-128x128.jpg?rev=1947657)
 * [Contact Form 7 Gated Content](https://wordpress.org/plugins/cf7-gated-content/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-gated-content/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-gated-content/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-gated-content/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-gated-content/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-gated-content/reviews/)

## Tags

 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)

 * 3 replies
 * 2 participants
 * Last reply from: [Wyatt Kirby](https://wordpress.org/support/users/odisant/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/parse-error-519/#post-11860959)
 * Status: resolved