1

After manual installation of the plugin in Wordpress (5.0.1), PHP (7.2.12), mySQL (10.1.36-MariaDB). I can't activate it.

I receive this info:

Fatal error: Can't use function return value in write context in .../public_html/CRM/wp-content/plugins/civicrm/civicrm.php on line 342

1

It sounds like you may be using an unsupported PHP version. CiviCRM 5.8.1 requires PHP 5.6 or higher.

If this solves your problem, please mark it solved; if not, please edit your question to indicate your PHP version?

  • Added PHP version 7.2.12 and mySQL version as required. – Wojtek Dec 14 '18 at 22:41
  • 1
    @Wojtek That's odd - the PHP manual says that this construction only throws a fatal error in PHP versions less than 5.5: php.net/manual/en/function.empty.php Are you sure about your PHP version? FWIW, there's a fix in the pipeline - you can apply it by changing the plugin code as per this PR: github.com/civicrm/civicrm-wordpress/pull/143 – Christian Wach Dec 17 '18 at 10:30
  • @ChristianWach thank you for the fix. In PHPmyAdmin I have "PHP: 7.2.12". I applied it and tried to activate again. Then I've got: Parse error: syntax error, unexpected '[' in .../public_html/CRM/wp-content/plugins/civicrm/civicrm.php on line 894 – Wojtek Dec 18 '18 at 11:13
  • @wojtek That's a sure sign that the PHP version running CiviCRM is older than 5.4. I would check with your hosting provider - while it's unusual that two applications on the same server run different PHP versions it's certainly not impossible. – Jon G - Megaphone Tech Dec 18 '18 at 14:52
  • Thank you. It's solved. My hosting provider misled me about PHP version in CLI. It was 5.6 not 7.2. I changed it to 7.2. To make it work I had to change it also in .htaccess – Wojtek Dec 19 '18 at 21:50

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.