2.11.12. Running scripts that require ionCube, Zend Encoder, Memcache(d) or Redis
To run through console or cron script that requires to work ionCube, Zend Encoder, Memcache(d), Redis or other modules plugged into PHP settings, it is necessary in the start command:
- Specify the path to the PHP interpreter of the same version as installed in the settings of the site in the directory of which the script to be launched is located.
- Specify the path to the php.ini of the site in the directory of which the script to run is located.
Paths to PHP interpreters of all available versions:
/usr/local/php4/bin/php /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
The path to the php.ini of the site looks like this:
/home/account/.system/php/www.example.com.ini
On my way:
- Instead
account
should be hosting account namewhere the script to run is located. - Instead
www.example.com
there must be the name of the site / subdomain in the directory of which the script to run is placed.
The launch command itself looks like this:
/usr/local/php72/bin/php -c /home/account/.system/php/www.example.com.ini -f path/to/script.php
In a team:
/usr/local/php72/bin/php
- the path to the PHP interpreter of the required version.-c
- the key followed by the path tophp.ini
desired site./home/account/.system/php/www.example.com.ini
- way tophp.ini
desired site.-f
— a key followed by the path to the script being launched.path/to/script.php
- the path to the script to run.