- Download SQL Server Express 2019: https://www.microsoft.com/en-us/sql-server/sql-server-downloads
- Choose CUSTOM install
- Choose media download target location, leave it default.
- On SQL Server Installation Center choose "New SQL Server stand-alone installation..." menu.
- On Feature Selection at least select the main "Database Engine Services" option (SQL Server Replication, Machine Learning stuff, Full-Text search are optional). Also make sure all "Client Tools..." options and "SQL Client Connectivity SDK" are selected.
- On Instance Configuration we set the SQL Server instance name, we can leave all options default (
SQLEXPRESS
). - On Server Configuration, we can set the "Startup Type" for "SQL Server Database Engine" to manual. So in order to use the SQL Server, we have to start it manualy through the Sql Server Configuration Manager application.
- On Database Engine Configuration set the "Authentication Mode" to Mixed Mode. Specify the password for the
sa
user.
- Download laragon: https://laragon.org/download/
- Download the 32-bit version of PHP 5.6 even if you use a 64-bit OS :https://windows.php.net/downloads/releases/archives/php-5.6.40-Win32-VC11-x86.zip (We use the thread-safe version)
- Extract the downloaded zip and move the
php-5.6.40-Win32-VC11-x86
folder toC:\laragon\bin\php
. - Download and install the 32-bit version of Visual C++ Redistributable for Visual Studio 2012 (VC11): https://www.microsoft.com/en-us/download/details.aspx?id=30679 (Choose vcredist_x86).
- To activate the 5.6 version, right-click on the Laragon app: PHP >> Version >> php-5.6.40-Win32-VC11-x86
- Download the 64-bit version of ODBC Driver 11 for SQL Server: https://www.microsoft.com/en-us/download/details.aspx?id=36434
- Download Microsoft driver for PHP for SQL Server version 3.2: https://www.microsoft.com/en-us/download/details.aspx?id=20098 (Choose SQLSRV32.EXE). Once you run the executable, you'll find the
php_pdo_sqlsrv_56_ts.dll
andphp_sqlsrv_56_ts.dll
files on the extracted folder. - Copy both
php_pdo_sqlsrv_56_ts.dll
andphp_sqlsrv_56_ts.dll
toC:\laragon\bin\php\php-5.6.40-Win32-VC11-x86\ext
. - To activate the extensions, right-click on Laragon: PHP >> Extensions >> Click those two new files.
- For PHP 7.2 and above, use Microsoft PHP Drivers for SQL Server version 5.8: https://docs.microsoft.com/en-us/sql/connect/php/download-drivers-php-sql-server?view=sql-server-ver15
- Microsoft PHP Drivers for SQL Server version 5.8 requires ODBC Driver 17 which already installed during the SQL Server Express 2019 installation.