All you need to do is install the Apache SQL Server drivers and PHP.
If you are using Linux, you can refer to this link
You must be registered to see links
if you are using a Windows server refer to this link u need xammp or wamp
You must be registered to see links
Under the "web_conexao" folder, you need to configure the "settings.php" and "pdo.php" files for your connection. Depending on the installation, if you have installed "msodbcsql17", you can modify the connection as follows:
try {
$dsn = "odbc: Driver={ODBC Driver 17 for SQL Server};Server={$this->db_host};Uid={$this->db_usuario};Pwd={$this->db_senha};";
self::$db = new PDO($dsn);
self::$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
die("Connection Error: " . $e->getMessage());
}
Don't forget to restore the "Mweb. bak" database and update all the PHP short tags (<?) to full PHP tags (<?php) if you are using PHP 8 or PHP 7.