0

I am much experienced in PHP PDO but I am getting issues while I am connecting my PHP file with SQL Server. It is showing "Could not find drivers". I have been searching on google and found a lot of links to install Microsoft drivers but nothing worked for me.

My System Configuration on a RDP Machine:

Window Server 2008 R2
Service Pack 1
64 Bit Operating system

PHP Configuration:
5.3.13
and Wamp 2.2.

SQL Server Configuration:
SQL Server 2008 R2

I have enabled all PDO extensions in PHP.ini files of PHP and Apache too and when I am printing available drivers of PDO then it is showing these drivers only

Array ( [0] => sybase [1] => mysql [2] => odbc [3] => sqlite [4] => sqlite2 )

Don't understand what is the issue or am I doing something in wrong way?

Satish Saini
  • 2,880
  • 3
  • 24
  • 38
  • Have you copied/moved `pdo_sqlsrv.dll` and `sqlsrv.dll` to your PHP's ext-folder and added them to your php.ini? – dbrumann Mar 18 '14 at 07:11
  • Yes, I have download all the dll files from microsoft's official website and copied all files to php5.3.13/ext/ folder. These the extenisions extension=php_pdo_sqlsrv_54_nts.dll extension=php_pdo_sqlsrv_54_ts.dll extension=php_sqlsrv_54_nts.dll extension=php_sqlsrv_54_ts.dll and I have also tried with 52 and 53 but nothing works. – Satish Saini Mar 18 '14 at 07:17
  • You should only add `php_sqlsrv_53_ts.dll` and the corresponding `php_do_sqlsrv_53_ts.dll` Have you specified the `extension_dir` in your php.ini? Have you restarted your web server after changing the php.ini? – dbrumann Mar 18 '14 at 12:49
  • Might be worth having a look at another question similar http://stackoverflow.com/questions/22530231/sqlsrv-php-for-sql-server-for-is-not-a-valid-win32-application/22531135#22531135 – AdRock Mar 21 '14 at 15:06

0 Answers0