X
X
Worldwide (English) USD 0

Welcome

Sign in

Knowledge Base

HomepageKnowledge BaseWeb HostingVPS ServersHow to install mssql on PHP7...

How to install mssql on PHP74 with apache (aapanel)

In this tutorial we show how to install the drivers to connect to Microsoft SQL Server (Almalinux Server with aapanel and PHP)

Requirements:

AlmaLinux 8.8
PHP 7.4
aapanel control panel


Access your turbohost instance through the terminal and run the following commands as root:

curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo
yum clean all
yum update -y
ACCEPT_EULA=Y yum install -y msodbcsql mssql-tools unixODBC-devel
cd /tmp
wget https://pecl.php.net/get/sqlsrv-5.8.0.tgz
tar -zxvf sqlsrv-5.8.0.tgz
cd sqlsrv-5.8.0
/www/server/php/74/bin/phpize
./configure --with-php-config=/www/server/php/74/bin/php-config
make
make install

echo "extension=sqlsrv.so" >> /www/server/php/74/etc/php.ini
cd /tmp
wget https://pecl.php.net/get/pdo_sqlsrv-5.8.0.tgz
tar -zxvf pdo_sqlsrv-5.8.0.tgz
cd pdo_sqlsrv-5.8.0
/www/server/php/74/bin/phpize
./configure --with-php-config=/www/server/php/74/bin/php-config
make
make install
echo ""
echo "extension=pdo_sqlsrv.so" >> /www/server/php/74/etc/php.ini
 

If the following error occurs when connecting to the bank:
[ODBC 17 Driver for SQL Server]SSL Provider: [error:1425F102:SSL Routines:ssl_choose_client_version:unsupported protocol] [message]

Must enable TLS minor version support for TLS1. Edit the file /etc/crypto-policies/back-ends/openssl/opensslcnf.config and add or change the following line with the MinProtocol:

TLS.MinProtocol = TLSv1.0

Can't find the information you are looking for?

Create a Support Ticket
Did you find it useful?
(700 times viewed / 0 people found it helpful)
Copyright © 2025 All Rights Reserved
Top