6

I am trying to use sql-server with php . I downloaded 64 bit php_pdo_sqlsrv_56_ts.dll and php_sqlsrv_56_ts.dll from this unofficial site. I extracted the dll files to D:\wamp64\bin\php\php5.6.31\ext. In php.ini I have added the following lines and restarted the WAMP:

[PHP_SQLSRV]
extension=php_sqlsrv_56_ts.dll
[PHP_PDO_SQLSRV]
extension=php_pdo_sqlsrv_56_ts.dll

in WAMP>php>extensions , it shows me this:

enter image description here

on clicking those extensions, php console shows the error The 'php_sqlsrv_56_ts.dll' extension file exists but there is no 'extension=php_sqlsrv_56_ts.dll' line in php.ini. .

I have no idea where the problem is, i found out same question here but that was version (32/64) issue which is also not my case as i have downloaded 64 bit extensions already.

Any suggestions would be extremely helpful.

whoosis
  • 424
  • 7
  • 22
  • 1
    Did you make any changes in your `php.ini`? You will need something like `extension_dir = C:\php\extensions`. You will need to change the [extension_dir](http://php.net/manual/pl/ini.core.php#ini.extension-dir) setting to point to the directory where your extensions lives. – Ilyes Nov 18 '17 at 14:34
  • 1
    @Sami `extension_dir` was already set in `php.ini` and i added these dll's to that directory to which `etension_dir` was set . – whoosis Nov 18 '17 at 18:57

1 Answers1

9

Apparently, there are two php.ini files, one in wamp>bin>PHP folder and the other is in Apache folder which is also available from in wamp tray icon. I updated the file in php folder, and on checking ,the php.ini in wamp (tray icon) wasn't updated. On updation of that file, the issue was resolved.

whoosis
  • 424
  • 7
  • 22