Install SqlSrv in multi PHP


New member
Mar 24, 2022
hello I installed DirectAdmin for the first time and I wanted to test it with my applications, where I have site with php7.4 and php8.0, I have installed everything now but if I install the SQLSRV module it is put on default (7.4), usually just do it from /usr/local/php80 but it does not install, and since the paths are different from the standard, how can I "switch" to php8 on the shell?
if I check the php7.4 have the sql module...
ok resolved... I must install direct
/usr/local/php80/bin/pecl install sqlsrv
and afert add
echo "" > /usr/local/php80/lib/php.ini

for all version....
Hi, can you tell me how were you able to install sqlsrv on php 7.4?
When I try to install I get the following problem.

[root@lin7 custom]# /usr/local/php73/bin/pecl install pdo_sqlsrv
No releases available for package ""
install failed
That is not the line Stefano used. He didn't use pdo_sqlsrv.

Try this way:
/usr/local/php73/bin/pecl install sqlsrv
Thanks Richard,
however I get the same error on that pack as well.

[root@lin7 ~]# /usr/local/php73/bin/pecl install sqlsrv
No releases available for package ""
install failed
[root@lin7 ~]#
To everyone out here that will encouter this in the future, the following did the trick to enable SQLSRV in all the PHP versions on our DA installation.

yum install unixODBC-devel
cd /usr/local/directadmin/scripts/custom
wget -O
chmod 750
./ install sqlsrv
./ install pdo_sqlsrv