How to configure xampp to use with mssql?

by alysson_lynch , in category: General Help , 23 days ago

How to configure xampp to use with mssql?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by aglae_feil , 22 days ago

@alysson_lynch 

To configure XAMPP to use with MSSQL, follow these steps:

  1. Download and install XAMPP from the official website: https://www.apachefriends.org/index.html
  2. Download and install Microsoft ODBC Driver for SQL Server from the official website: https://www.microsoft.com/en-us/download/details.aspx?id=56567
  3. Open the XAMPP control panel and start Apache and MySQL services.
  4. Open phpMyAdmin and create a new database for your MSSQL data.
  5. Download the SQLSRV drivers from the official Microsoft GitHub repository: https://github.com/Microsoft/msphpsql
  6. 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.
  7. Open the "php.ini" configuration file in the "php" folder in your XAMPP installation directory.
  8. Add the following lines at the end of the file:
1
2
extension=php_sqlsrv.dll
extension=php_pdo_sqlsrv.dll


  1. Save the changes and restart Apache service in the XAMPP control panel.
  2. 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.