When you install DA on VPS, some extensions are already installed by default, but if you need other PHP extensions then you need to manually install them.
I SSH into VPS then find the configuration file of PHP
cd / usr / local / directadmin / custombuild
./build used_configs | grep configure.php
You will get a paragraph like this
PHP (default) configuration file: /usr/local/directadmin/custombuild/configure/fastcgi/configure.php56
Next we proceed to copy the configuration file of PHP to another directory
cd / usr / local / directadmin / custombuild
mkdir -p custom / fastcgi
cp -fp configure / fastcgi / configure.php56 custom / fastcgi / configure.php56
Next, we open the PHP configuration file
nano custom / fastcgi / configure.php56
Add the last line of extensions to be installed in PHP with the -with-name structure, for example, and then save with ctrl + O, then ctrl + X to exit.
–with-pear
–with-xsl \
–with-zlib
–enable-soap \
–with-mcrypt \
Then run the following command to run PHP again
./build php n
After running, we will restart the service
/ httpd restart sbin / service