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

  1. bruceo
    Member

    on WP 2.9.1 whenver I click on the plugins header or click on forms I get this error "Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/19/d115439915/htdocs/firstsightpictures/wp-content/plugins/gravityforms/gravityforms.php on line 43" This was after I activated with the registration code.

    I installed using WP's auto install and it seemed to install with no problems.

    edit, no I get that error on pretty much anything I click in WP....

    Posted 14 years ago on Tuesday January 12, 2010 | Permalink
  2. Extrememuz
    Member

    I also are getting the same error with WP 2.9.1 rolled back to GF 1.3.7 still with no luck.

    Posted 14 years ago on Tuesday January 12, 2010 | Permalink
  3. That is very odd. We are running Gravity Forms on WP 2.9.1 without any issues. Gravity Forms is compatible with the 2.9.1 version of WordPress.

    That T_FUNCTION error is a PHP version error. It is caused by running an incompatible version of PHP. Typically it is caused when a user tries to run Gravity Forms on PHP 4 instead of of the required PHP 5.

    Have you both had Gravity Forms up and running on these sites prior to 2.9.1 or are these new installs that had not had Gravity Forms installed on them yet?

    Posted 14 years ago on Tuesday January 12, 2010 | Permalink
  4. bruceo
    Member

    Never had Gravity forms up at all and this is a clean WP install with about 10 plugins installed and all installed with no issues and they work fine so far, none of them are forms related.
    Initially I tried the autoinstall feature to install gravity forms and it would not work so I installed by ftp and got the error above. I then removed it and figured it might be a PHP prob.

    I am using 1and1 as a host andI remembered that getting 2.9 to 2.91 autoupgrade to work I had to addAddType x-mapp-php5 .php
    AddHandler x-mapp-php5 .php

    to the .htaccess file in the root of the website and then it worked. So I checked the root of the wordpress directory for an .htaccess file and there was one there so i added the same code and then the gravityforms autoinstall worked. (although the autoinstall worked for all other plugs without changing the htaccess. There was a warning message that existed that said I could not use the simplevideo embedder properly unless I changed from PHP4 to 5 but after I made the htacess change that warning went away, which was a confirmation to me that PHP5 was now being used.

    But gravitforms still causes that error and currently renders the entire admin useless. I know I can ftp and remove GF but I really need to get the site up yesterday so hopefully we can get it figured out, especially since this is the only plug I have paid for. Thx

    edit
    I removed by ftp and removed the failed download files from failed autoinstalls then I checked the .htaccess file in the wp root folder and noticed my code was no longer there, so I added it again and then logged in and reinstalled GF automatically and all seems well. I do notice there is no more register request under the GF plug listing, which I believe was the last thing I did before the error I posted reappeared.

    When entering the activation code could GF somehow have changed/reset the .htacess file or something else that would have caused that to happen? Because I also noticed when i removed the GF plugin folder by FTP and logged in the Warning message about the Simplevid plug not working well on PHP4 upgrade to PHP5 msg returned....

    Posted 14 years ago on Tuesday January 12, 2010 | Permalink
  5. Gravity Forms does nothing with the .htaccess file.

    Every host is different and has their own quirks, it's hard to tell why it didn't work. But you said it's working now, so just keep an eye on it.

    It sounds like PHP 5 didn't activate properly. The error you saw was due to trying to run it on PHP 4 so that is where the problem is.

    Posted 14 years ago on Tuesday January 12, 2010 | Permalink
  6. I 've actually installed Gravity Forms for a client who's hosting on 1and1 recently, added the AddHandler snippet to the .htaccess file for PHP5 support and everything is working without any issues.

    I doubt the issue is Gravity Forms related. It's most likely related to one of the other plugins.

    Posted 14 years ago on Tuesday January 12, 2010 | Permalink
  7. Extrememuz
    Member

    Thanks, my php switched during my site upgrade.

    Posted 14 years ago on Wednesday January 13, 2010 | Permalink
  8. @Extrememuz - Glad you got it worked out. Thanks for the update.

    Posted 14 years ago on Wednesday January 13, 2010 | Permalink
  9. I'm getting the same error. Odd because I've installed on two sites today, both running the current version of WordPress (2.9.1). First one no problems, second one:

    Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/content/k/e/n/kennylee1/html/newgr/wp-content/plugins/gravityforms/gravityforms.php on line 43

    Not sure why. Even tried a new PHP 5 MySql DB. These were both done on fresh installs of WP. This is the first issue I've had with several installs of GF. I'll keep testing in the meantime.

    Posted 14 years ago on Friday January 15, 2010 | Permalink
  10. Ahhh... as previously stated, it's must be a PHP 4/5 issue. Apparently the site was an older account still running PHP 4. I've upgraded to PHP 5 with still the same error. I'm guessing it may take some time to take in affect.

    Posted 14 years ago on Friday January 15, 2010 | Permalink
  11. It may take some time to start working. Some hosts don't have a delay in switching settings. But that error is a PHP 4 error so if it continues you will need to verify that your site is in fact running PHP 4. We have had customers who's web hosts had said they were running PHP 5 when in fact they weren't.

    Posted 14 years ago on Friday January 15, 2010 | Permalink
  12. Problem solved. It took some time for the PHP to switch. Everything works great, as usual!

    Thanks

    Posted 14 years ago on Friday January 15, 2010 | Permalink