Abadis Abadis - 20 days ago 6
PHP Question

Installing SQL Server driver for PHP

I have installed:


  1. Windows Server 2008 R2 x64

  2. IIS 7

  3. PHP 5.5 (5.5.9) VC11 x64 Non Thread Safe (2014-Feb-06 00:36:15)

  4. MSVC11 (Visual C++ 2012)

  5. Sql Server 2008

  6. Sql Native Client



Everything works perfectly except the MSSQL driver for PHP. I have Googled a lot and downloaded lots of
dll
files. Every time I get this error:


PHP Warning: PHP Startup: Unable to load dynamic library c:\php\ext\php_sqlsrv_54_nts.dll - %1 is not a valid Win32 application.
in Unknown on line 0


Can anyone tell me that how can I find the specified driver? Thanks in advance.

Answer

There's a clue in the file name php_sqlsrv_54_nts.dll

The "54" refers to PHP 5.4. The SQL Driver doesn't (officially) exist yet for PHP 5.5.

:(

Some people have worked on unofficial builds, but I would only use them for local testing. Microsoft sqlsrv extension for php 5.5.x

At present official releases only work with 5.4.x