Repository navigation
Fix connection issues with older MS SQL versions
Lautaro Angelico edited this page Apr 25, 2025
·
2 revisions
WebEngine CMS is designed to run on the latest PHP environments. As a result, you may encounter connectivity issues when connecting to Microsoft SQL Server 2016 or earlier.
While we strongly recommend using up-to-date software to avoid potential security risks, we understand that some setups may require older versions.
If that is the case, this Wiki page provides several options to help you resolve these compatibility issues.
- Make sure you have the FreeTDS package installed
apt install freetds-bin
- Edit the FreeTDS file
nano /etc/freetds/freetds.conf
- Add your SQL connection configuration
[webengineConnection]
host = your_sql_server_ip
port = 1433
encryption = off
tds version = 7.1
- Test the connection to your SQL server
tsql -S webengineConnection -U your_sql_username -P your_sql_password
- When installing WebEngine CMS, instead of entering your SQL server IP address, simply enter
webengineConnection
If you continue to have connectivity issues
- Try a different FreeTDS version:
- 7.0 MSSQL 2000
- 7.1 MSSQL 2000, 2005, 2008
- 7.2 MSSQL 2008, 2008R2
- 7.3 MSSQL 2012+
- 7.4 MSSQL 2016+
- Try switching the encryption setting on/off
- Open WebEngine CMS Database Class File
/includes/classes/class.database.php
- Find the following code:
$pdo_connect = "sqlsrv:Server=".$SQLHOST.",".$SQLPORT.";Database=".$SQLDB."";
- Update it as follows:
$pdo_connect = "sqlsrv:Server=".$SQLHOST.",".$SQLPORT.";Database=".$SQLDB.";Encrypt=true;TrustServerCertificate=true;";
- Proceed with WebEngine CMS installation normally.
If you continue to have connectivity issues
- Try setting the encryption setting on/off
-
Encrypt=trueto enable it -
Encrypt=falseto disable it
-