Cyberin gives you the option to choose a number of PHP versions for your hosting environment. But running commands like composer over SSH will use the system default PHP version. This system PHP is a minimal install and is designed for internal use and may not have all of the extensions and modules you are used to in a full web hosting PHP setup.
Hence, understanding the behavior of Composer in the SSH environment to execute dependency management commands is important.
When you simply type:warnings or
composerthe command will execute with the default PHP binary that is installed on the server. This PHP version is normally “lightweight” and may not be the same as the version your website or application uses. This can lead to missing extension warnings, or incompatibility if your project requires some PHP modules.
To make it work, you will have to call Composer explicitly with the PHP version you want. For example:
php8.1 /usr/local/bin/composer installor
php8.2 /usr/local/bin/composer updateThis ensures the composer runs with the correct PHP environment for your application needs.
Before running any Composer commands always check which PHP version your project is using. Using the right version prevents problems with dependencies, missing extensions and surprises at run-time.
More precisely, managing PHP versions over SSH is synonymous with reliable dependency management and uniform application deployments.