none
SQL Driver for PHP 5.5 64bit + Windows Server 2012 IIS8

    Question

  • Hi there,

    wanted to ask how the chances are for a sqlsrv driver for the new php 5.5 x64? I ask, because development

    on the driver seems to be completely stopped, or am I wrong?

    Thanks

    Tuesday, April 30, 2013 11:33 AM

Answers

  • 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:
    http://www.hmelihkara.com/files/php_sqlsrv_55.rar
    Also I change file versions to 3.0.2 to solve confusion with the old versions.
    ----------------------------------
    Legal:
    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
    Changes:
    Line 77 of php_sqlsrv.h changes from:

    #if PHP_MAJOR_VERSION > 5 || PHP_MAJOR_VERSION < 5 || ( PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3 ) || ( PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 4 )

    to:

    #if PHP_MAJOR_VERSION > 5 || PHP_MAJOR_VERSION < 5 || ( PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4 ) || ( PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 5 )


    • Edited by hmelihkara Wednesday, June 26, 2013 9:43 AM license link
    • Marked as answer by eskimoe Friday, July 05, 2013 2:19 AM
    Wednesday, June 26, 2013 9:43 AM

All replies

  • Hi eskimoe,

    This issue can occur if the driver component is corrupted, please reinstall the driver and check the result again. Additionally, please post the error message you received here for analysis.

    Microsoft Drivers 3.0 for PHP for SQL Server
    http://www.microsoft.com/en-us/download/details.aspx?id=20098

    Introducing the Microsoft Drivers for PHP for SQL Server
    http://msdn.microsoft.com/en-us/library/cc296172(SQL.90).aspx


    Allen Li
    TechNet Community Support

    Wednesday, May 01, 2013 6:48 AM
  • Hi Allen,

    That doesn't seem to be an answer to my question at all, does it? ;)

    Friday, May 03, 2013 9:31 AM
  • Yep, probably he didn't read the question or doesn't check the new php 5.5 x64 :)

    Also 3.0.1 drivers are not working anymore with php 5.5 x86 :(

    Are there any news about when will drivers are compiled for php 5.5?

    Saturday, June 22, 2013 9:09 AM
  • #bump
    Sunday, June 23, 2013 11:14 PM
  • I hope the following can assist the Microsoft MVPs roll out a PHP 5.5.

    It is a simple issue.   PHP 5.5 was compiled with 2012 C++ Runtime.  Therefore when trying to load php_pdo_sqlsrv_54_nts.dll on Windows 2012 IIS 8.0 the following error is reported in the PHP Error Log....

    PHP Warning:  PHP Startup: pdo_sqlsrv: Unable to initialize module Module compiled with module API=20100525 PHP    compiled with module API=20121212 These options need to match in Unknown on line 0

    I believe php_pdo_sqlsrv_54_nts.dll needs to be recompiled to VC11 2012 C++ Runtime and become php_pdo_sqlsrv_55_nts.dll.

    At this time, we cannot move to PHP 5.5 due to our sqlsrv driver not working.

    John

    Monday, June 24, 2013 7:00 PM
  • 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:
    http://www.hmelihkara.com/files/php_sqlsrv_55.rar
    Also I change file versions to 3.0.2 to solve confusion with the old versions.
    ----------------------------------
    Legal:
    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
    Changes:
    Line 77 of php_sqlsrv.h changes from:

    #if PHP_MAJOR_VERSION > 5 || PHP_MAJOR_VERSION < 5 || ( PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3 ) || ( PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 4 )

    to:

    #if PHP_MAJOR_VERSION > 5 || PHP_MAJOR_VERSION < 5 || ( PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4 ) || ( PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 5 )


    • Edited by hmelihkara Wednesday, June 26, 2013 9:43 AM license link
    • Marked as answer by eskimoe Friday, July 05, 2013 2:19 AM
    Wednesday, June 26, 2013 9:43 AM
  • hmelihkara

    Well done!

    I have tested your compiled php_pdo_sqlsrv_55_nts.dll on Windows 2012 IIS8 and it is working!
    It was that simple.  
    You have resolved the x86 driver.

    Do we wait now for Microsoft to compile a new official PHP_55 version by following your steps?

    John Plavocos

    Saturday, June 29, 2013 2:50 PM
  • Hi John,

    Compiling driver is little bit painful. You can not compile the driver alone. So you must compile the whole PHP 5.5 source code (with dependencies and tools) that which will compile the all the extensions including SQL PHP driver. Actually you can use it in production environment I think, because I didn't change any working part, just change the version check for compatibility with PHP 5.5. Addition to this, as they wrote: "VC11 has optimizations, improvements and fixes over VC10 in areas like C++, Performance, Memory Management and Stability"

    So the driver compiled with VC11 that used with PHP 5.5 will be more stable then the older versions.

    By the way, If anyone want to use the driver with Apache, they must download the Apache version that compiled with VC11 (http://www.apachelounge.com/viewtopic.php?p=23836)

    Saturday, June 29, 2013 4:49 PM
  • Hi hmelihkara,

    What 'configure' options did you use to compile PHP 5.5.x and the SQLSRV extension?  I want to compile this myself.

    Alternatively, Microsoft, can you please release an official update to the PHP SQLSRV drivers that are compatible with PHP 5.5.x, thanks!

    Pete

    Sunday, November 03, 2013 11:01 AM