SQL Server drivers not found by php.ini

Viewed 490

I'm currently using XAMPP locally and I'm having problems while trying to make PHP recognize sqlsrv drivers (downloaded from Microsoft).

I followed these steps:

  1. installed the drivers
  2. extracted them to php/ext
  3. properly referenced them in php.ini
  4. restarted apache

After that, I checked the phpinfo.php file and the only PDO Drivers listed are mysql and sqlite.

php.ini:

extension=php_pdo_sqlsrv_80_ts_x64.dll
extension=php_sqlsrv_80_ts_x64.dll

Error log:

PHP Warning: PHP Startup: pdo_sqlsrv: Unable to initialize module\nModule compiled with module API=20200930\nPHP compiled with module API=20210902\nThese options need to match\n in Unknown on line 0 PHP Warning: PHP Startup: sqlsrv: Unable to initialize module\nModule compiled with module API=20200930\nPHP compiled with module API=20210902\nThese options need to match\n in Unknown on line 0

What am I missing?

Thanks in advance.

0 Answers
Related