So far, I've followed the steps outlined in this tutorial: https://www.microsoft.com/en-us/sql-server/developer-get-started/php/windows However, the php version listed was not avaiable, so I went with PHP 7.3, and I've been using the 5.6 PHP for SQL Server drivers with it. The problem is that when I run the sample connect.php, it returns Fatal error: Call to undefined function sqlsrv_connect() in C:\inetpub\wwwroot\db.php on line 12
I understand that this is because PHP doesn't recognize sqlsrv as a module.
When I run php -d display_startup_errors=1 -d error_reporting=-1 -d display_errors -c "C:\Path\To\php.ini" -m
it doesn't display sqlsrv, as expected, but I'm not sure what's causing this problem.
I call both php_sqlsrv_73_ts_x64.dll
and php_pdo_sqlsrv_73_ts_x64.dll
in the ext folder in the php.ini-production file as ;extension=php_sqlsrv_73_nts_x64.dll ;extension=php_pdo_sqlsrv_73_nts_x64.dll
.
This isn't working, so I've tried using the threaded instead of non_threaded versions as well but it still isn't recognizing sqlsrv as a module. I don't know if it might have something to do with how I'm placing the extension statements in the php.ini-production file, but here is how it is placed. https://i.imgur.com/8My60tv.png
Any help is greatly appreciated.