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 for the respective user under ‘Manage SSHd/Crond’ and the following be considered
– Refer to the article on how to use Cronjobs on N99panel – https://n99panel.com/ufaq/can-i-run-cron-jobs-in-n99panel/
– Multiple PHP versions are accessible using full paths of php executables as under
— /usr/bin/php70 (PHP 7.0)
— /usr/bin/php71 (PHP 7.1)
— /usr/bin/php72 (PHP 7.2)
— /usr/bin/php73 (PHP 7.3)
— /usr/bin/php74 (PHP 7.4)
— /usr/bin/php80 (PHP 8.0)
— /usr/bin/php81 (PHP 8.1)
— /usr/bin/php82 (PHP 8.2)
– Multiple corresponding composer versions are accessible as under :
— Composer with PHP 7.0 – /usr/bin/php70 /usr/local/bin/composer
— Composer with PHP 7.1 – /usr/bin/php71 /usr/local/bin/composer
— Composer with PHP 7.2 – /usr/bin/php72 /usr/local/bin/composer
— Composer with PHP 7.3 – /usr/bin/php73 /usr/local/bin/composer
— Composer with PHP 7.4 – /usr/bin/php74 /usr/local/bin/composer
— Composer with PHP 8.0 – /usr/bin/php80 /usr/local/bin/composer
— Composer with PHP 8.1 – /usr/bin/php81 /usr/local/bin/composer
— Composer with PHP 8.2 – /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.
If you require a custom PHP extension, please let us know so that we can make it available for you.