I'm trying to install a SQLSRV extension. My PHP version is 7.2 (XAMPP 3.2.2) and I use windows 10. I downloaded the .dll from here: https://github.com/Microsoft/msphpsql/releases. Then I unpacked it to the xampp/php/ext
folder
After that I opened the php.ini
and added this extension:
Next I restarted the Apache server.
Unfortunately when I open the phpinfo website I don't see the extension. Also when I open the XAMPP shell and type php I'm getting an error.
PHP Startup: Unable to load dynamic library 'php_pdo_sqlsrv_72_nts' (tried: C:\xampp\php\ext\php_pdo_sqlsrv_72_nts (Module was not found.)
My extension_dir in php.ini is set to extension_dir="C:\xampp\php\ext"
.
Architecture is x86.
What did I do wrong?
EDIT: I've changed the nts to ts files and now its working.
worked for me by telling in the PHP.ini file in this way:
extension=mysql
extension=sqlsrv
extension=pdo_sqlsrv
so, you have to remove "php_" and ".dll"
Remove the
php_
prefix from your php.ini file. because php automatically searching with the name of file with the prefix: php_pdo_sqlsrv_72_ts_x86.dll Example: if you register the dll file as:
pdo_sqlsrv_72_ts_x86
then php will search the dll file as:
php_php_pdo_sqlsrv_72_ts_x86.dll
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With