5

On an Ubuntu 16.04 VM with PHP 7.x, I am seeing the following error when enabling CiviCRM in Drupal 7:

ParseError: syntax error, unexpected 'clone' (T_CLONE), expecting identifier (T_STRING) or '(' in require_once() (line 1 of /home/westernfriend/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(207) : eval()'d code).

Is this due to incompatibility with PHP 7, a missing dependency, or perhaps something else?

1
  • I just wanted to drop in and say thanks. Installing LTS (at the time not uo to PHP 7.0) and wondering why I was getting error after error. Fighting Index location and PHP Parse errors to no avail.... now I know why... too smart to read the docs first... duh. Thanks. Commented Nov 12, 2017 at 7:15

1 Answer 1

7

PHP 7 is not supported yet - see CRM-17789

Also: this and this

Update (Aug 2017): The information above was correct when it was written. Things have moved on and PHP 7.0 is supported from 4.7.12 onwards. Earlier versions of 4.7 don't run on PHP 7.0 and nor does any released version of 4.6. There are discussions about adding this to 4.6 - see the same ticket.

The most current information should be on CiviCRM PHP Requirements

2
  • According to the information in wiki.civicrm.org/confluence/display/CRMDOC/… PHP 7.0 is compatible. I am running 7.0.22 but still get the same error.
    – Vietyank
    Commented Aug 26, 2017 at 16:45
  • @Vietyank - what version of CiviCRM are you running?
    – Aidan
    Commented Aug 29, 2017 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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