1

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

2 Answers 2

1

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.

1

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

see:

http://blog.oomta.com/sqlsrv-dll-pdo-and-php-5-on-windows-via-wamp/

and

https://stackoverflow.com/questions/1560207/having-problems-loading-php-driver-for-sql-server-2008-express

1
  • Same deal with latest sqlsrv drivers (3.01), no 64-bit release. Switching from WAMP64 to WAMP32 fixes the error.
    – Kim
    Aug 15, 2012 at 9:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .