PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

error message on install

  1. I tried to install GravityForms on a site, and after trying to activate, I get this error:

    Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '} ' in path.to/wp-content/plugins/gravityforms/gravityforms.php on line 43

    I've also installed this on another site (I have the developer license) and didn't have this problem. Any ideas what could be causing this error?

    Thanks.
    Terri

    Posted 14 years ago on Tuesday January 26, 2010 | Permalink
  2. Yep. It's usually a PHP version conflict.

    Gravity Forms requires PHP5+ and the error indicates you are trying to activate the plugin on a site running PHP4. Check with your web host and make sure you have PHP5 enabled.. for many hosts, it's a setting in the control panel that you can access.

    http://www.gravityhelp.com/frequently-asked-questions/faq-installation/

    You can always download the Gravity Forms requirements check plugin to make sure the site has the correct environment for Gravity Forms to work properly.

    Posted 14 years ago on Tuesday January 26, 2010 | Permalink
  3. aha. thanks for that. the host supports 5; i just didn't realize the server was still on 4. all set now.

    Posted 14 years ago on Tuesday January 26, 2010 | Permalink
  4. Kevin, this seems to be a recurring support topic. Could a check be added to Gravity Forms to check the PHP version, and if it's not sufficient, return a message "Gravity Forms requires PHP 5 but you're running version {$version}. Please enable PHP 5 or check with your hosting company" or something to that effect. It would be more explicit than this cryptic error message from PHP.

    I think there are other WordPress plugins that do this, and I even think WordPress now has some sort of check for MySQL version, IIRC. Just a suggestion. These requests are easy to field, but why not cut them off at the pass?

    Posted 14 years ago on Tuesday January 26, 2010 | Permalink
  5. Oh, I know about the requirements check plugin, and it's also in the documentation, but I'm not sure which people do less: read the docs or install a plugin to check requirements BEFORE actually installing the plugin they want.

    Posted 14 years ago on Tuesday January 26, 2010 | Permalink
  6. @torlowski - Glad it worked for you. Thanks for the update.

    Chris, thanks for the suggestion. It's something we'll definitely consider.. and yeah, most people really don't read the documentation or FAQ. I'd have to cry guilty on that one from time to time myself.

    Posted 14 years ago on Tuesday January 26, 2010 | Permalink

This topic has been resolved and has been closed to new replies.