Page tree
Skip to end of metadata
Go to start of metadata

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 SCLs, read our Introduction to EasyApache 4 documentation.

The scl Utility

The scl utility uses the following syntax:

scl option action library 'command'
VariableDescriptionPossible valuesExample
optionThe desired option.
  • -l, --list — List the server's available software package collections.
  • -h, -help — Display the scl utility's help output.

-l

 

actionThe action to perform.
  • enable
  • register
  • deregister
enable
libraryThe 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:

 Click to view...
[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