Here is my setup
I need to load Microsoft's SQLSRV library.
I have added 'extension=php_sqlsrv_54_ts.dll' to php.ini and copied 'php_sqlsrv_54_ts.dll' to the ext folder where PHP is installed.
When I restart apache, I get the following error in my php error log, and SQLSRV is not listed in phpinfo.
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php5\ext\php_sqlsrv_54_ts.dll' - %1 is not a valid Win32 application.
Where am I going wrong?
EDIT For testing purposes I've just installed PHP 5.5.10 64 bit and VC 2012 but the error remains the same :(
I don't know if it helps but i used all 32bit on my Windows 7 64bit system
Here is what I used and i can use SQL Server
httpd-2.4.6-win32-VC9 //apache 2.4
php-5.4.9-Win32-VC9-x86 //php5
inside if my \php\
folder i have
Inside \php\ext\
i have
I added this to the end of php.ini
[PHP_SQLSRV]
extension=php_sqlsrv_54_ts.dll
[PHP_PDO_SQLSRV]
extension=php_pdo_sqlsrv_54_ts.dll
I remember it being a right pain getting it to work but it does now. If i remember anymore i'll edit my answer
UPDATE:
I think this blog post looks familiar on how i got it working
http://robsphp.blogspot.co.uk/2012/09/how-to-install-microsofts-sql-server.html