Skip to content

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.


Using PHP PDO DBLIB driver (Debian/Ubuntu)

  1. Make sure you have the FreeTDS package installed
apt install freetds-bin
  1. Edit the FreeTDS file
nano /etc/freetds/freetds.conf
  1. Add your SQL connection configuration
[webengineConnection]
    host = your_sql_server_ip
    port = 1433
    encryption = off
    tds version = 7.1
  1. Test the connection to your SQL server
tsql -S webengineConnection -U your_sql_username -P your_sql_password
  1. When installing WebEngine CMS, instead of entering your SQL server IP address, simply enter webengineConnection

If you continue to have connectivity issues

  1. 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+
  2. Try switching the encryption setting on/off

Using PHP PDO SQLSRV driver (Windows)

  1. Open WebEngine CMS Database Class File
/includes/classes/class.database.php
  1. Find the following code:
$pdo_connect = "sqlsrv:Server=".$SQLHOST.",".$SQLPORT.";Database=".$SQLDB."";
  1. Update it as follows:
$pdo_connect = "sqlsrv:Server=".$SQLHOST.",".$SQLPORT.";Database=".$SQLDB.";Encrypt=true;TrustServerCertificate=true;";
  1. Proceed with WebEngine CMS installation normally.

If you continue to have connectivity issues

  • Try setting the encryption setting on/off
    • Encrypt=true to enable it
    • Encrypt=false to disable it

Clone this wiki locally