Error reading /etc/psa/php_versions.json: can not parse php_versions_info object

Created:

2016-11-16 13:24:05 UTC

Modified:

2017-08-08 13:17:39 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Error reading /etc/psa/php_versions.json: can not parse php_versions_info object

Applicable to:

  • Plesk

Symptoms

Plesk encounters various errors. For example, different Plesk utilities fail with an alike error:

# /usr/local/psa/bin/admin --show-password

2013-11-21T12:54:04+01:00 ERR (3) [util_exec]: proc_close() failed
2013-11-21T12:54:06+01:00 ERR (3) [panel]: Error reading /etc/psa/php_versions.json: can not parse php_versions_info object : JSON object is expected. Error occured at offset 0, character '\\x00'.
Releasing semaphore 27 in request

The same error may be seen in Plesk GUI:

ERROR: Service_Agent_Exception
Up Level
Unable to execute php_handlers_control: Error reading /etc/psa/php_versions.json: can not parse php_versions_info object : JSON object is expected. Error occured at offset 0, character '\\x00'.

Cause

/etc/psa/php_versions.json is modified or corrupted.

Resolution

For Plesk 17.5 on CentOS 7, do the following:

1. Save the original file:

# mv /etc/psa/php_versions.json /etc/psa/php_versions.json.orig

2. Download the proper file:

# wget https://plesk.zendesk.com/hc/article_attachments/115000777334/php_versions.json

3. Replace old file with the correct one:

# mv php_versions.json /etc/psa/php_versions.json

For the rest of Plesk versions and operating system, contact Plesk technical support, or:

  1. Save the original file:

    cp -p /etc/psa/php_versions.json /etc/psa/php_versions.json.orig
  2. Replace the file from psa-php5-configurator package. You can download the package from Plesk installation repository http://autoinstall.plesk.com/

    2.1. Download the corresponding package by using the proper URL which matches your OS (here is an example for Plesk 11.5 on Ubuntu 10.04):

    wget http://autoinstall.plesk.com/PSA_11.5.30/dist-deb-Ubuntu-10.04-x86_64/opt/php5/psa-php5-configurator_1.6.3-ubuntu10.04.build115130724.18_amd64.deb

    2.2. Unpack the file from a package and replace:

    • For Debian-like systems:

      mkdir extracted/

      cd extracted/

      dpkg -x /<path_to_package>/psa-php5-configurator_1.6.3-ubuntu10.04.build115130724.18_amd64.deb extracted/

      cp ./extracted/etc/psa/php_versions.json /etc/psa/php_versions.json
    • For RPM-like systems

      mkdir extracted/

      cd extracted/

      rpm2cpio /<path_to_package>/psa-php5-configurator-1.6.3-cos6.build115130724.19.x86_64.rpm | cpio -idmv

      cp ./extracted/etc/psa/php_versions.json /etc/psa/php_versions.json

Attachments:

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