PHP

CloudStick is packed with different versions of PHP’s and it depends on the ubuntu flavours.

For Ubuntu 20.04LTS(Focal) flavour, CloudStick offers PHP versions 7.2, 7.3, 7.4, 8.0
For Ubuntu 18.04LTS(Bionic) flavour, CloudStick offers PHP versions 7.0, 7.1, 7.2, 7.3, 7.4, 8.0
For Ubuntu 16.04LTS(Xenial) flavour, CloudStick offers php versions 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0

Note: CloudStick will continue to serve Ubuntu 16.04LTS(Xenial) as long as possible since it is discontinued byUbuntu.

CloudStick’s PHP versions are named as php[VERSION]cs and PHP FPM is named as php[VERSION]cs-fpm

Basic commands to handle PHP from a console terminal.

You can manage PHP services from the CloudStick dashboard itself. Following commands are helpful if you prefer to use the terminal.

Here, commands are discussed in favour of PHP version 8.0.

# Start
systemctl start php80cs-fpm

# Stop
systemctl stop php80cs-fpm

# Reload
systemctl reload php80cs-fpm

# Restart
systemctl restart php80cs-fpm

# Enable
systemctl enable php70cs-fpm

# Disable
systemctl disable php70rc-fpm

PHP Installation Location

On your CloudStick controlled server, PHP Versions are installed in Directory

/CloudStick/Packages/php[version]cs/

Configuration File (php.ini) Path => /etc/php[version]cs

Loaded Configuration File => /etc/php[version]cs/php.ini

Note: It is not recomended to edit this main configuration file, any chnages in it will affect all your webapplications.

Additional .ini files can be found on => /etc/php[version]cs/conf.d/

Web application PHP Configuration.

In CloudStick, there will be a dedicated PHP configuration for each of your web applications including subdomains. Which can be found on directory /etc/php[version]cs/fpm-pools.d/

Consider your web application name is app-test which using php version 8.0, then it’s configuration file is

/etc/php80cs/fpm-pools.d/app-test.conf

Extra PHP-FPM configuration

If you prefer to add some additional PHP-FPM configuration for your web application, you can add it into the file

/etc/php[version]cs/extra.d/<app-name>.conf

For example, if your application name is app-test and is using PHP 8.0, then an extra PHP-FPM configuration file can be found on location
/etc/php80cs/extra.d/app-test.conf