Wordpress installation is not synced: PHP Parse error: syntax error, unexpected '?' in /usr/share/plesk-wp-cli/php/WP_CLI/Runner.php(996) : eval()'d code on line 1

Created:

2016-12-18 06:52:16 UTC

Modified:

2017-08-08 13:44:05 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Wordpress installation is not synced: PHP Parse error: syntax error, unexpected '?' in /usr/share/plesk-wp-cli/php/WP_CLI/Runner.php(996) : eval()'d code on line 1

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Windows

Symptoms

Wordpress toolkit shows an installation with exclamation sign.The following error pops-up when opening Wordpress:

PHP Parse error: syntax error, unexpected '?' in /usr/share/plesk-wp-cli/php/WP_CLI/Runner.php(996) : eval()'d code on line 1

The following error can be seen in /usr/local/psa/admin/logs/panel.log :

DEBUG [util_exec] [bfed2328558694640316a4c7a04f12e9][0] Starting: wpmng --user=user --php=/opt/plesk/php/7.0/bin/php -- --path=/var/www/vhosts/example.com/httpdocs user check-password  , stdin:
[2016-10-04 18:21:42] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/wpmng' '--user=user' '--php=/opt/plesk/php/7.0/bin/php' '--' '--path=/var/www/vhosts/example.com/httpdocs' 'user' 'check-password' '' ''] with exit code [255]
[2016-10-04 18:21:42] DEBUG [util_exec] [bfed2328558694640316a4c7a04f12e9][0] Finished in 0.15272s, Error code: 255, stdout: , stderr: PHP Parse error: syntax error, unexpected '?' in /usr/share/plesk-wp-cli/php/WP_CLI/Runner.php(996) : eval()'d code on line 1
[2016-10-04 18:21:42] ERR [panel] Unable to check WordPress admin credentials while reset cache: PHP Parse error: syntax error, unexpected '?' in /usr/share/plesk-wp-cli/php/WP_CLI/Runner.php(996) : eval()'d code on line 1

<U+FEEF> symbols are shown openning wp-config.php file in the beginning of the file:

# less /var/www/vhosts/example.com/httpdocs/wp-config.php

<U+FEFF><?php

This is not seen if the file is opened using cat or vi utilities.

Cause

Incorrect syntax in wp-config.php file.

Resolution

Recreate wp-config.php :

  1. List the proper content of the configuration file:

    # cat /var/www/vhosts/example.com/httpdocs/wp-config.php
  2. Rename the file:

    # mv /var/www/vhosts/example.com/httpdocs/wp-config.php{,.orig}
  3. Recreate the configuration file and manually copy the content there:

    # vi /var/www/vhosts/example.com/httpdocs/wp-config.php

Make sure that there is /** on the next row after <?php in the beginnig of the wp-config.php .

Have more questions? Submit a request
Please sign in to leave a comment.