To manage software packages in a Software Collection Library (SCL) environment via the command line, use the scl utility.
EasyApache 4 (EA4) uses SCLs for PHP versions. SCLs allow multiple concurrent software packages to reside on your file system. You can use this utility if you run multiple websites that require different PHP versions.
For more information about EasyApache, read our About EasyApache 4 documentation.
The scl Utility
The scl utility uses the following syntax:
scl option action library 'command'
Variable
Description
Possible values
Example
option
The desired option.
-l, --list — List the server’s available software package collections.
-h, -help — Display the scl utility’s help output.
-l
action
The action to perform.
enable
register
deregister
enable
library
The SCL.
A valid PHP software collection.
An absolute filepath to the software collection.
Important:If you use the register or deregister variable, you must pass the SCL’s absolute filepath. The SCLs reside in the /opt/cpanel/ea-phpxx/root/usr/bin directory, where xx represents the ea-php version.
ea-php70
'command'
The command to run in the SCL environment.
For a list of valid commands, run the php --help or pecl --help commands.
'php -m'
Example
To view the ea-php70 SCL modules, run the following command: