shweta_kaushish
shweta_kaushish

Reputation: 151

sqlsrv_connect() not working with Wamp 32 bit

I am using wamp 32 bit version & have downloaded sql server drivers from Microsoft site as well.

I have added all these in both ini files php & Apache as well,Not sure which one to keep & which one to remove.

extension=php_sqlsrv_53_nts.dll
extension=php_sqlsrv_53_ts.dll
extension=php_sqlsrv_54_nts.dll
extension=php_sqlsrv_54_ts.dll
extension=php_sqlsrv_55_nts.dll
extension=php_sqlsrv_55_ts.dll
extension=php_sqlsrv_56_nts.dll
extension=php_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_54_nts.dll
extension=php_pdo_sqlsrv_54_ts.dll
extension=php_pdo_sqlsrv_55_nts.dll
extension=php_pdo_sqlsrv_55_ts.dll
extension=php_pdo_sqlsrv_56_nts.dll
extension=php_pdo_sqlsrv_56_ts.dll

Still I am getting this error

Fatal error: Call to undefined function sqlsrv_connect() in C:\wamp\www\otpvoice\db.php on line 25

Upvotes: 0

Views: 207

Answers (1)

RiggsFolly
RiggsFolly

Reputation: 94642

First of all in WAMPServer you need the Thread Safe ts version of these files and not the Not Thread Safe nts versions.

Then you need the Thread safe version that matches your PHP Version

So for example this dll is for PHP 5.3

extension=php_sqlsrv_53_ts.dll

and this would be for PHP 5.6

extension=php_sqlsrv_56_ts.dll

Upvotes: 1

Related Questions