3

I'm running CiviCRM 4.5.5, Having recently upgraded to WordPress 4.9.5 and PHP 5.6 (mailing was flawless just prior to this). Latest scheduled mailing failed to initiate, and a URL method test of cron.php generated the following error:

Parse error: syntax error, unexpected 'clone' (T_CLONE), expecting '(' in /.../wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(207) : eval()'d code on line 1

Is there any simple way to fix this? (After the time it took to set CiviCRM up several years ago, I'm reluctant to upgrade--I'm a volunteer, not a tech.)

4

As PHP develops, some code that used to work in older versions fails in newer versions. The CiviCRM code gets updated to accommodate those changes - but obviously if you don't upgrade you don't get those fixes.

Your fix is to downgrade the version of PHP, then upgrade CiviCRM, then upgrade PHP again. You can find a table of supported PHP vs CiviCRM versions in the Administration Guide

If you need help upgrading see Find an Expert (including me!)

2

Chris (OP) here. I opted to go with a fresh site, latest version install (PHP 7.1, WP 7.9.6, CiviCRM 5.1.2). Cron still not functioning, so I decided to go with Easycron rather than waste more days of my life. Thanks for your input though guys :)

1

The problem is a library included in CiviCRM doesn't work with your new PHP version.

I expect you may be able to successfully upgrade Civi without first downgrading PHP, so try that. If you get errors, then follow @Aidan's advice and downgrade PHP, upgrade CiviCRM, then upgrade PHP again.

Note that you can often install a second version of PHP on the same system and switch between them.

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.