'PHP Startup: Can't load module 'ext\php_sqlsrv_81_ts.dll' - xampp
I have problem with connectting my laravel project to SQL server database. I'am using xampp with PHP Version 8.1.1. I downloaded appropriate extensions for my php version and pasted them to C:\xampp\php\ext.
php_pdo_sqlsrv_81_ts.dll
php_sqlsrv_81_ts.dll
excerpt from php.ini file (C:\xampp\php\php.ini):
extension=bz2
extension=curl
;extension=ffi
;extension=ftp
extension=fileinfo
extension=gd2
extension=gettext
;extension=gmp
;extension=intl
;extension=imap
;extension=ldap
extension=mbstring
extension=exif ; Must be after mbstring as it depends on it
extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=odbc
;extension=openssl
;extension=pdo_firebird
extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
extension=pdo_sqlite
;extension=pgsql
;extension=shmop
extension_dir = "C:\xampp\php\ext"
extension=php_sqlsrv_81_ts.dll
extension=php_pdo_sqlsrv_81_ts.dll
;extension=soap
;extension=sockets
;extension=sodium
;extension=sqlite3
;extension=tidy
;extension=xmlrpc
;extension=xsl
When trying to connect I get errors:
PHP Warning: PHP Startup: Can't load module 'C:\xampp\php\ext\php_sqlsrv_81_ts.dll' as it's linked with 14.29, but the core is linked with 14.16 in Unknown on line 0
Warning: PHP Startup: Can't load module 'C:\xampp\php\ext\php_sqlsrv_81_ts.dll' as it's linked with 14.29, but the core is linked with 14.16 in Unknown on line 0 PHP Warning: PHP Startup: Can't load module 'C:\xampp\php\ext\php_pdo_sqlsrv_81_ts.dll' as it's linked with 14.29, but the core is linked with 14.16 in Unknown on line 0
Warning: PHP Startup: Can't load module 'C:\xampp\php\ext\php_pdo_sqlsrv_81_ts.dll' as it's linked with 14.29, but the core is linked with 14.16 in Unknown on line 0
and
Whoops\Exception\ErrorException
PHP Startup: Can't load module 'C:\xampp\php\ext\php_pdo_sqlsrv_81_ts.dll' as it's linked with 14.29, but the core is linked with 14.16
1 C:\xampp\htdocs\YI\vendor\filp\whoops\src\Whoops\Run.php:486
Whoops\Run::handleError("PHP Startup: Can't load module
'C:\xampp\php\ext\php_pdo_sqlsrv_81_ts.dll' as it's linked with 14.29, but the core is linked with 14.16", "Unknown")2 [internal]:0 Whoops\Run::handleShutdown()
Could someone please help me?
Thanks in advance.
Solution 1:[1]
I think https://github.com/microsoft/msphpsql/releases/download/v5.10.0/Windows-8.1.zip is what you need.
you can extract files into your ext/ directory "C:\xampp\php\ext".
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | crowdy |