2.11.12. Execute scripts that require ionCube, Zend Encoder, Memcache(d), or Redis

Attention!

Executing the script without the conditions described in the article will result in an error stating that ionCube is not installed, the Memcache(d) or Redis class is missing, etc.

To execute a script that requires ionCube, Zend Encoder, Memcache(d), Redis, or other extensions that are enabled in the "PHP settings" section, it is required to specify the following in the execution command:

  1. Specify the path to the PHP interpreter of the same version that is set in the site settings, in the directory where the executable script is located. Paths to PHP interpreters of all available versions:
    /usr/local/php52/bin/php
    /usr/local/php53/bin/php
    /usr/local/php54/bin/php
    /usr/local/php55/bin/php
    /usr/local/php56/bin/php
    /usr/local/php70/bin/php
    /usr/local/php71/bin/php
    /usr/local/php72/bin/php
    /usr/local/php73/bin/php
    /usr/local/php74/bin/php
    /usr/local/php80/bin/php
    /usr/local/php81/bin/php
    /usr/local/php82/bin/php
    /usr/local/php83/bin/php
    /usr/local/php84/bin/php
    /usr/local/php85/bin/php
  2. Specify the path to the site's php.ini file, located in the directory where the script is executed. Example path to php.ini:
    /home/example/.system/php/www.example.com.ini

    In the path:

    • Instead of example, there should be the name of the hosting account where the script is located.
    • Instead of www.example.com, there should be the name of the site or subdomain in whose directory the executable script is located.

Example of the launch command:

/usr/local/php85/bin/php -c /home/account/.system/php/www.example.com.ini -f path/to/script.php

In command:

  • /usr/local/php85/bin/php — path to the PHP interpreter of the required version.
  • -c — key, followed by the path to the php.ini file for the desired site.
  • /home/account/.system/php/www.example.com.ini — path to the php.ini file of the desired site.
  • -f — key, which must be followed by the path to the script to be launched.
  • path/to/script.php — path to the script being launched.
Content