This is an old revision of the document!
PHP versions and their FPM/CLI/Cron usage
Under N99panel multiple PHP versions are available. There are three ways PHP is used
– FPM (via browser)
– CLI (Command Line Interface)
– Cron daemon
PHP usage via FPM is handled from within N99panel interface. Each VHost/Website under N99panel can have its own PHP version
When using PHP CLI via SSH, ‘Full SSHD flavor’ needs to be enabled for the respective user under ‘Manage SSHd/Crond’. Following points/info be considered
– Multiple PHP versions as accessible via php70 (PHP 7.0), php71 (PHP 7.1), php72 (PHP 7.2), php73 (PHP 7.3), php74 (PHP 7.4), php80 (PHP 8.0), php81 (PHP 8.1), php82 (PHP 8.2). The default PHP version accessed via php command is PHP 7.4
– Multiple corresponding composer versions are accessible via compose70, composer71, composer72, composer73, composer74, composer80, composer81
– To use composer with PHP 8.2, please use the following command to access composer php82 /usr/local/bin/composer
When using PHP with Cron daemon or cronjobs, ‘Full SSHD flavor’ needs to be enabled along with CronD for the respective user under ‘Manage SSHD/Crond’. For running cronjobs, your can refer to - Enabling Cron Jobs
Under cron, Multiple PHP versions are accessible using full paths of php executables as under
/usr/bin/php70 /usr/bin/php71 /usr/bin/php72 /usr/bin/php73 /usr/bin/php74 /usr/bin/php80 /usr/bin/php81 /usr/bin/php82
Multiple corresponding composer versions are accessible as under :
/usr/bin/php70 /usr/local/bin/composer\\ /usr/bin/php71 /usr/local/bin/composer\\ /usr/bin/php72 /usr/local/bin/composer\\ /usr/bin/php73 /usr/local/bin/composer\\ /usr/bin/php74 /usr/local/bin/composer\\ /usr/bin/php80 /usr/local/bin/composer\\ /usr/bin/php81 /usr/local/bin/composer\\ /usr/bin/php82 /usr/local/bin/composer\\
A typical cron job may look like
*/15 * * * * /usr/bin/php80 /home/user/vhost_public_html/phpscript.php
The above cron will execute the above script every 15 min. Please note that cron jobs under N99panel word as per UTC time zone.
If you require a custom PHP extension, please let us know so that we can make it available for you.