Update For PHP 5.5

Apr 26, 2013 at 6:25 PM
Are there plans for this driver to be complied for PHP 5.5? If so, what is the timeline?
Jun 22, 2013 at 9:05 AM
+1 for that...
Jun 24, 2013 at 8:39 PM
+100 :)
Jun 24, 2013 at 8:51 PM
And as I guessed, no response....
Jun 24, 2013 at 8:53 PM
If we don't get a response soon, I will try to compile these myself. When I do, I'll update this post so that you can test my build if you want.
Jun 25, 2013 at 2:36 PM
Also msdn forum's php driver page has no responses to 5.5 driver needs.
So I've just downloaded VS 2012 Express + php-5.5.0-src + sqlsrvphp-src.
I try my best a couple of days...
Jun 25, 2013 at 3:22 PM
Ok, let me know.
Jun 26, 2013 at 9:39 AM
Edited Jun 26, 2013 at 9:47 AM
Ok, I compile for both normal and pdo drivers with Thread Safe (x86) / Non Thread Safe (x86).
I testes Non Thread Safe PDO driver with php 5.5 (x86) and it's working.
You can download files here:

Also I change file versions to 3.0.2 to solve confusion with the old versions.

This is a project of Microsoft Corporation and as the version.h file writes, I've permission to change the source code and distribute it with giving the details that I made and giving the copy of the license here: http://www.apache.org/licenses/LICENSE-2.0
Line 77 of php_sqlsrv.h changes from:
Jun 26, 2013 at 10:02 AM
Edited Jun 26, 2013 at 10:03 AM
Can you compile a 64bit version? Thank you.
Jun 26, 2013 at 10:18 AM
As http://windows.php.net/download/#x64 says, x64 is experimental and do not yet provide 64-bit integer support.
While I'm trying to compile for x64 I got integer errors and loss of data errors then compiler stops.
I think we must wait for real x64 support for php.
Jul 8, 2013 at 10:58 PM
I can confirm that it works on IIS 7.5 (Windows 7, x64), for PHP (php_sqlsrv_55_nts.dll.)
Jul 24, 2013 at 8:28 PM
I tried it and works fine for now. Thank you.
Jul 25, 2013 at 1:03 PM
I made an issue for this item, please go up vote it to bring attention to it for the project.

Jul 25, 2013 at 2:18 PM
Aug 26, 2013 at 3:44 AM
Hi Wshmstr,

Thank you very much bro. I have tested and can confirm that the Thread Safe versions work on PHP 5.5 on a x64 machine. My configuration is a WAMP and WASP stack with
Apache 2.4.4
MySQL 5.6.11
PHP 5.5.1
MS SQL 2008R2 (Express)
php_pdo_sqlsrv_55_ts.dll &
php_sqlsrv_55_ts.dll loaded as dynamic extensions. 
I haven't run performance tests yet, but I'm seeing a marked improvement in server performance for complex queries coded for earlier sqlsrv (again unofficial :-) drivers. I upgraded to PHP 5.5.1 yesterday thinking I'll compile the driver source and swallow the downtime. Boy! You saved me all that work.

And, this is precisely why I love open source. Regular Joes like me get assistance from awesome folks like yourself and if someday we get the chance; to pay it forward.

Once again, Thank you so much.

Life's complex, but the simple things are what matter most. I wish all of you the scent of a new idea and the liberty to pursue it.
Dec 24, 2013 at 7:20 PM
Take a look at Apachelounge, the Members download forum:

All my x86 builds contain a (unofficial) php_sqlsrv.dll. The latest for PHP 5.5.7 are in

Jan 26 at 12:54 PM
Version 5.6.0 alpha1 is online and we still don't have official support for version 5.5 :(
Jan 26 at 1:13 PM
Even worse: the sqlsrv extensions do not compile anymore under PHP 5.6.0alpha1, even after patching line 77 in php_sqlsrv.h.
Apr 17 at 1:16 PM
JanEhrhardt, very thanks!

I use xampp + php 5.5.11, and the dlls of sqlsrv in http://phpdev.toolsforresearch.com/php-5.5.7-Win32-VC11-x86.zip is working.
Apr 23 at 4:26 PM
I am trying to compile this in 64-bit but I keep getting this error:

LINK : fatal error LNK1181: cannot open input file 'x64\Release_TS\ext\pdo_sqlsrv\core_stmt.obj'

For pdo-sqlsrv and this:

LINK : fatal error LNK1181: cannot open input file 'x64\Release_TS\ext\sqlsrv\core_stmt.obj'

For sqlsrv, I checked the folder and none of those files exist or generated during nmake.

I'm using the latest sources from this website, how can I fix this?

Apr 23 at 4:55 PM
sqlsrv does not support x64 yet. If anyone knows a way I will be happy to add a php_sqlsrv.dll to
May 8 at 1:47 PM
Well, I have compiled sqlsrv for PHP 5.5 x86 just fine, but when I tried to compile it for PHP 5.6 x86 I still get the same error message, so it's not just x64, something else is happening with sqlsrv.

My compilations can be found at: http://www.fsbcomputers.com/extensions
May 13 at 6:56 AM
+1, please publish official release!!
Jun 10 at 2:27 AM
+1, please publish official release!!!
Jun 16 at 3:18 PM
+1, please publish official release!!!
Jun 19 at 8:07 AM
As of writing this PHP 5.6 is already in Beta 4, but still no official release of this driver for PHP 5.5, or any word thereof! I guess this project is dead...

Time to switch back to FreeTDS. At least the FreeTDS developers respond...
Jun 19 at 8:37 AM
Edited Jun 19 at 9:08 AM
They responded months ago that they said, they release official version, but nothing.
Probably they want to drop support. They don't want php & sql server community grow more and more because they also have a product (ASP.NET) which is only the competitor of php in the market. I've made few tests with odbc & native client, that I see native odbc is significantly faster then microsoft's pdo.
Only problem is sql injection, but I don't think that's a big problem. Internet full of functions & snippets about how to avoid sql injections while using odbc & sql server on php. Give a shot...

Edit: I'm giving you a very simple test results:

Scenario 1: A table with 1922 records inside it with simple SELECT and echo results. Both using SQL Server Native Client 11.0
Here are the results:

PDO: 0.16279983520508 s
ODBC: 0.076398849487305 s

ODBC is faster more than 2X.

Scenario 2: A table with more than 21 Million records inside it with simple SELECT TOP 100000 and echo results. Both using SQL Server Native Client 11.0
Here Are the Results:

PDO: 10.077439069748 s
ODBC: 3.9198169708252 s

ODBC is faster more than 2.5X

I already started to convert my codes to native ODBC. Not that hard.

Hope it helps...
Jun 19 at 10:29 AM
Edited Jun 19 at 10:34 AM
Thanks wshmstr.

Where did they (Microsoft?) respond? I'd love to see their message...

And what does it take to convert your code to ODBC? Surely you have to rewrite a whole lot of it?

Rewriting code is not an option for me. I'm using this SQLSRV driver to connect a system that I didn't develop (Moodle) to MSSQL - and it has over a million lines of code, so rewriting it is not an option.

But FreeTDS is! I have used it previously (before Microsoft released this SQLSRV driver) so reverting back it easy. And it has less bugs... I origionally switched to the SQLSRV driver from FreeTDS because using a driver from a big, professional, established, blah blah blah company like Microsoft gave me and my IT managers a warm secure fuzzy feeling. I guess I was wrong...
Jun 19 at 12:10 PM
MS actually replied back to the MS Connect issue a week ago.


Posted by Microsoft on 6/12/2014 at 11:09 PM
We are working on an updated version. We do not have final dates yet, but as soon as we close on the final dates, I'll update the community.

I'm also closing this issue as a duplicate due to infrastructure issues, so we can track it better.


Jun 19 at 12:17 PM
That's great news... although they said the same thing a year ago (2013/07/19 at 10:37 AM).

Looking forward to the release date...