I am using:
- XAMPP version 3.3.0 with php version 8.1.10
- Microsoft SQL Server Management Studio 18
Error message:
Fatal error: Uncaught Error: Call to undefined function sqlsrv_connect() in C:\xampp\htdocs\treasureDoc\php\otentifikasi.php:5 Stack trace: #0 C:\xampp\htdocs\treasureDoc\index.html(45): otentifikasi('', '') #1 {main} thrown in C:\xampp\htdocs\treasureDoc\php\otentifikasi.php on line 5
This is what I have tried so far:
- download and extract file from this link https://learn.microsoft.com/en-us/sql/connect/php/download-drivers-php-sql-server?view=sql-server-ver16 to c:\xampp\php\ext
- download and install odbc driver 18 for sql server
- i added extension=php_sqlsrv_81_ts.dll and extension=php_pdo_sqlsrv_81_ts.dll to the php.ini file
I've tried everything mentioned here Fatal error: Call to undefined function sqlsrv_connect() in C:\xampp\htdocs