2

Our volunteer group uses Civicrm. It runs under Drupal. We host with ..(cough cough) Godaddy. Recently their Cpanel automatically switched us from PHP 5.4 to 7 and our Civicrm 4.7.7 crashed with errors.

To cut a long story short after their techs told us it was a malicious attack, and we went into melt down changing passwords etc, we find it was simply the PHP version change.

So back on topic, we had our Civi working fine under 5.4php and after the crash we went back from PHP 7 to 5.4. Now just one of our reports throws an error:

Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in at line 304

Here is the code around line 304

), 'civicrm_membership' => array( 'dao' => CRM_Member_DAO_Membership::class, 'fields' => array( 'membership_status' => array( 'title' => ts('Membership Status'), 'name' => 'status_id', 'default' => TRUE,

This is line 304 specifically: 'dao' => CRM_Member_DAO_Membership::class,

After doing some reading i found a statement that the use of the word class in php is a reserved word and shouldn't be used. Not really sure what that means. However Our report that was working no longer works.

Am i missing maybe a duplicate here or is it something more than i can handle?

Cheers and Gday from Australia

3

You are using quite older version of CiviCRM, I would recommend you to upgrade CiviCRM to 4.7.31 or 5.2.1 rather fixing core code to handle php7. The newer version does support php7. And also since 4.7.7 there has been many security releases(since you had malicious attack) and includes many fixes.

HTH

Pradeep

  • No- don't upgrade to 4.7.31 - if you are upgrading upgrade to 5.2.1 - 4.7.31 is not the latest version in any major version. 4.7 & 5.x are the same 'major version' – user4278 Jun 18 '18 at 0:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.