@alysson_lynch
To configure XAMPP to use with MSSQL, follow these steps:
- Download and install XAMPP from the official website: https://www.apachefriends.org/index.html
- Download and install Microsoft ODBC Driver for SQL Server from the official website: https://www.microsoft.com/en-us/download/details.aspx?id=56567
- Open the XAMPP control panel and start Apache and MySQL services.
- Open phpMyAdmin and create a new database for your MSSQL data.
- Download the SQLSRV drivers from the official Microsoft GitHub repository: https://github.com/Microsoft/msphpsql
- Extract the downloaded files and copy the "php_sqlsrv.dll" and "php_pdo_sqlsrv.dll" files to the "ext" folder in your XAMPP installation directory.
- Open the "php.ini" configuration file in the "php" folder in your XAMPP installation directory.
- Add the following lines at the end of the file:
1
2
|
extension=php_sqlsrv.dll
extension=php_pdo_sqlsrv.dll
|
- Save the changes and restart Apache service in the XAMPP control panel.
- You can now use MSSQL with XAMPP by connecting to your database using the SQLSRV driver in your PHP scripts.
Note: Make sure to configure the connection settings in your PHP scripts to connect to the MSSQL database using the appropriate server name, username, password, and database name.