Reputation: 440
I am trying to connect to a Azure data base. I have read many other stack overflow answers but they did not work for me:
-I have downloaded all the drivers that Azure offers to you. They are in
-I have added to the system variable the path to extensions folder.
-I have set the extension in both php.ini files (inside the apache and php folders).
-Extensions have been set like
extension=php_sqlsrv_5X_ts.dll
extension=php_pdo_sqlsrv_5X_ts.dll and like extension=C:/wamp/bin/php/php5.5.12/ext/php_sqlsrv_5X_ts.dll extension=C:/wamp/bin/php/php5.5.12/ext/php_pdo_5X_ts.dll
Where X means that I have tried 53, 54, 55 and 56.
-I restart all wamp services every single time that I try new changes.
-I have even tried with IISExpress.
-It is still giving me this error and I can't see "sqlsvr" when I use phpinfo()
.
what more I should do? I have been suffering this for weeks.
Upvotes: 1
Views: 3380
Reputation: 74
I refer to the practice of Jordi's message in this post: Fatal error: Call to undefined function sqlsrv_connect() in C:\xampp\htdocs
xampp3.2.1 + php 5.5 + sql server 2014 Express, x64.
My situation is, transplant xampp folder to a brand new computer.
Then it can work!!!!!
I have been searching for a solution to this problem for several days and hope to help more people.
Upvotes: 1
Reputation: 13918
I use this XAMPP with PHP 5.5.34 at https://www.apachefriends.org/download.html to have the test to enable the sqlsrv
extension of PHP.
You can refer my steps:
xampp-control.exe
, click config
=>PHP(php.ini)
to check the extension folder.php_pdo_sqlsrv_55_ts.dll
and php_sqlsrv_55_ts.dll
from the uncompressed driver folder to the PHP extension folder (X:\xampp\php\ext
in my scenario).extension=php_pdo_sqlsrv_55_ts.dll
and extension=php_sqlsrv_55_ts.dll
in PHP.ini
file.Meanwhile, you can use phpinfo()
to check the setting of Loaded Configuration File
and extension_dir
to make sure whether you have configured the correct settings in the definite files and the DLL files in the right folder.
Upvotes: 1