This question has been asked many times and I've gone through all of them and none of the solutions have worked for me.
Basically,
I am getting "could not find driver" exception when connecting to MSSQL server using PDO. Below is my spec:
Windows 8 - 64 Bit version
MSSQL server 2008 R2 - 64 bit version
Wampserver 2.4 - 64 bit version with PHP 5.4 (Thread Safe version)
This what I have done so far:
But still I am getting the same error.
Can anyone please help me resolve this error?
Output of phpinfo();
Found following in the error logs of Apache:
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.12/ext/php_pdo_sqlsrv_54_ts.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.12/ext/php_sqlsrv_54_ts.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
For those who run into the above problem here's the solution.
Apparently Microsoft don't have a 64 bit version of SQLSRV driver. Switching to a 32 bit version of wampserver solved the problem.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.