Article ID: 127927, created on Dec 28, 2015, last review on Dec 28, 2015

  • Applies to:
  • Plesk 12.0 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux

Symptoms

Application(for e.g. OpenCart) installation fails with the following error:

The 'mcrypt' extension was not found

or with the following one:

The 'json' extension was not found

Also the following errors can be found in /var/log/plesk/panel.log:

[Thu Feb 20 16:06:32 2014] [error] [client 10.53.178.246] PHP Fatal error:  Call to undefined function json_decode() in /var/www/vhosts/domain.tld/httpdocs/includes/modules/shipping/usps.php on line 293, referer: http://sub.domain.tld/index.php?cPath=43&osCsid=6cgjlip1ceu28frba0n4hm8ve2
[Thu Feb 20 16:06:37 2014] [error] [client 10.53.178.246] PHP Fatal error:  Call to undefined function json_decode() in /var/www/vhosts/domain.tld/httpdocs/includes/modules/shipping/usps.php on line 293, referer: http://sub.domain.tld/shopping_cart.php
[Thu Feb 20 16:06:40 2014] [error] [client 10.53.178.246] PHP Fatal error:  Call to undefined function json_decode() in /var/www/vhosts/domain.tld/httpdocs/includes/modules/shipping/usps.php on line 293, referer: 

Cause

Required PHP extensions extensions are not installed or disabled in configuration files.

Resolution

  1. Check that required extension is installed:

    # php-cgi -m |grep mcrypt
    mcrypt
    # php-cgi -m |grep json
    json
    

    Or with the following command:

    # rpm -qa |grep php-mcrypt
    php-mcrypt-5.4.37-43.el6.art.x86_64
    # rpm -qa |grep php-json
    php-json-5.4.37-43.el6.art.x86_64
    

    If it is not, install it using yum/apt-get command.

  2. Make sure that it is not commented in configuration files:

    # grep mcrypt /etc/php.d/mcrypt.ini
    extension=mcrypt.so
    # grep json /etc/php.d/json.ini
    extension=json.so
    
  3. Reconfigure your website were you want to install application:

    # /usr/local/psa/admin/bin/httpdmng --reconfigure-domain domain.tld 
    

a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c 29d1e90fd304f01e6420fbe60f66f838 01bc4c8cf5b7f01f815a7ada004154a2 0a53c5a9ca65a74d37ef5c5eaeb55d7f aea4cd7bfd353ad7a1341a257ad4724a 2a5151f57629129e26ff206d171fbb5f e335d9adf7edffca6a8af8039031a4c7

Email subscription for changes to this article
Save as PDF