The scl Utility

Last modified: August 28, 2024


Overview

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:

scl enable ea-php70 'php -m'

The output will resemble the following example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
filter
ftp
gd
hash
imap
json
libxml
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zlib

Additional Documentation