Skip to content

PHP

Overview

PHP configuration can be found in /etc/php/<version>/fpm/pool.d/www.conf. If you need to make ini changes please do it in this file.

We disable a small number of PHP functions that are considered to be security risks.

We use the dynamic PHP-FPM Process Manager and by default have a maximum of 500 child processes.

Opcache is enabled by default for performance improvements.

Switching Versions

To switch PHP versions on Cito sites, use the phpmgr utility:

cito~ # phpmgr
Usage: phpmgr -d <domain> -s <version>

  -d: Domain name (required).
  -s: <version> Set PHP version.
  -l: List available PHP versions.

Example: phpmgr -d test.com -s 8.2
(Sets the domain test.com to PHP 8.2).

The script automatically updates configuration files and switches to the new version. It will output the available versions and warn if you are trying to use one that is not available.

Command-line PHP

It's important to note that if you're using a different PHP version in your CLI scripts you'll need to either reference that version's binary directly, or add an alias to your bash_profile to switch to it.

For example, if your server has a default version of PHP 7.4 but you're using PHP 8.0, you will need to invoke it at the command-line as follows:

/usr/bin/php8.0 <command>

You can also add an alias for php to your bash_profile as follows:

echo "alias php='/usr/bin/php8.0'" >> ~/.bash_profile
(Substituting the version appropriately).

What versions are supported?

We follow the official PHP support policies detailed on https://www.php.net/supported-versions.php.

If you require another version please contact support.

What extensions are enabled?

By default, the following extensions are enabled:

  • bcmath
  • intl
  • gd
  • mbstring
  • cli
  • common
  • curl
  • imap
  • json
  • mysql
  • opcache
  • xml
  • zip
  • readline
  • soap
  • redis

Contact support if you need anything else installed.