Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have been striggling to set up the following scenario:

  • Apache 2 (64bit) running on Windows 7 (64bit)
  • PHP (64bit)
  • MS SQL Express 2008 as (local)

I have managed to install and configure both Apache and PHP, installed SQL Server 2008 Driver for PHP 2.0. I have amended my php.ini to include the appropriate php_pdo_sqlsrv_53_ts_vc9.dll but when start my server I keep getting "php_pdo_sqlsrv_53_ts_vc9.dll - %1 is not a valid Win32 application" message in the error log.

I am confused. I can't really make sense of the error message in this case. All components are 64bit now... Is it possible that the dll is 32?

Thanks for your help

share|improve this question

2 Answers 2

Looks like a 32bit vs. 64bit issue. I switched from WAMP 64 to WAMP 32 and am able to connect now.

see: http://blog.oomta.com/sqlsrv-dll-pdo-and-php-5-on-windows-via-wamp/ http://stackoverflow.com/questions/1560207/having-problems-loading-php-driver-for-sql-server-2008-express

share|improve this answer
    
Same deal with latest sqlsrv drivers (3.01), no 64-bit release. Switching from WAMP64 to WAMP32 fixes the error. –  Kim Aug 15 '12 at 9:45

There are unofficial 64 bit PDO drivers for MSSQL here: http://robsphp.blogspot.ca/2012/06/unofficial-microsoft-sql-server-driver.html

Seems to do the trick nicely on WAMP x64 and SQL Server 2008.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.