none
PHP 5.4

    Pregunta

  • Hello,

    tried upgrading to PHP 5.4 and the sqlsrv driver no longer works, no database functions load at all.  Went back to PHP 5.3.10; is there work on an updated driver for PHP 5.4?  Also have not tried but will the PDO driver work with php 5.4?

    lunes, 05 de marzo de 2012 17:32

Respuestas

  • Hi everyone,

    We've enabled support for PHP 5.4, as well some other bug fixes. You can find the new download at the normal location:

    http://www.microsoft.com/download/en/details.aspx?id=20098

    Cheers,

    Jonathan


    This posting is provided 'AS IS' with no warranties, and confers no rights.

    jueves, 22 de marzo de 2012 23:03

Todas las respuestas

  • The driver does not currently support PHP 5.4. We are evaluating when we can deliver this, and will have an announcement on this in the near future.

    Thanks,

    Jonathan


    This posting is provided 'AS IS' with no warranties, and confers no rights.

    lunes, 05 de marzo de 2012 20:07
  • Prakash

    Are you trying to run the sqlsrv driver in IIS or Apache on Windows?

    We are having the same problem with Apache Lounge VC10 compilation on Windows.

    martes, 06 de marzo de 2012 16:33
  • IIS on Windows Server 2008 R2 (64-bit).
    martes, 06 de marzo de 2012 16:40
  • Jonathan

    The current php_pdo_sqlsrv_53_ts_vc9.dll is NOT working with Apache on Windows and PHP 5.4 
    php_pdo_sqlsrv_53_nts_vc9.dll is NOT working on IIS with PHP 5.4.

    For Apache on Windows...See the Official PHP.net website at  http://windows.php.net/download/
    There is notation to the side that state the following...
    "VC9 versions of Apache can be fetched at Apache Lounge. We use their binaries to build the Apache SAPIs."
    All Apache on windows configurations use the Apache Lounge VC9 and VC10 compiled version of Apache.
    It seems as though a good clear message is coming from PHP_error.log
    See the following error...

    [06-Mar-2012 16:33:52 UTC] PHP Warning:  PHP Startup: pdo_sqlsrv: Unable to initialize module
    Module compiled with module API=20090626
    PHP    compiled with module API=20100525
    These options need to match
     in Unknown on line 0

    Hope this helps...

    Sincerely

    John Plavocos

    martes, 06 de marzo de 2012 17:40
  • Hi John,

    Do the binaries work with Apache and PHP 5.3.6? We do not currently have PHP 5.4 support, but are working on this and hope to have an update soon.

    Thanks,

    Jonathan


    This posting is provided 'AS IS' with no warranties, and confers no rights.

    martes, 06 de marzo de 2012 22:09
  • Dear Jonathan

    Where will the update for PHP 5.4 be published?

    Thanks,

    Marco

    miércoles, 07 de marzo de 2012 16:20
  • Parkash

    Amazing that TODAY you now have the offical SQL PHP 3.0 driver at...

    http://www.microsoft.com/download/en/details.aspx?id=20098

    The requirement of the NEW 3.0 php driver is that you must have SQL Native Client 2012
    Install that here...

    http://msdn.microsoft.com/en-us/library/cc296170.aspx

    We got it to work with our Apache on Windows HOWEVER only up to PHP 5.3.10.
    It did not work with PHP 5.4.  So we are wondering if you test the above, does PHP 5.4 work on your IIS?

    Thank you
    John

    miércoles, 07 de marzo de 2012 16:28
  • Jonathan

    As of TODAY, not yesterday, you (Microsoft) now have the offical SQL PHP 3.0 driver (see link below)
    We have installed the new PHP 3.0 driver and the new 2012 Native Client requirement along with Apache.
    PHP 5.4, however is does not work.  PHP 5.3.10 DOES work with the new PHP 3.0 driver.

    http://www.microsoft.com/download/en/details.aspx?id=20098

    Hope this update helps your team resolve PHP 5.4.

    Thank you
    John

    miércoles, 07 de marzo de 2012 16:33
  • I will try it shortly, I had the 3.0 CTP version installed and it did not work with 5.4 with IIS; but this is the final build 3.0 released today so I'll see if it does work with php 5.4

    -- tried the new build, does not work with 5.4 :)  The binary sqsrv30 looks like it was created on Feb 13th so it's expected its not compatible with 5.4 yet.

    miércoles, 07 de marzo de 2012 17:07
  • Hi guys,

    Thanks for the overwhelming requests for PHP 5.4 support. I assure you we are working on this, but I do not currently have an ETA. I will update you as soon as I have one. :)

    Thanks,

    Jonathan


    This posting is provided 'AS IS' with no warranties, and confers no rights.

    miércoles, 07 de marzo de 2012 20:39
  • I need SQLSRV Driver for PHP 5.4. When this will be released?
    viernes, 09 de marzo de 2012 9:54
  • There is no ETA on the driver for php 5.4.  You can download php 5.3.10 from windows.php.net and use sqlsrv 3.0 driver until Microsoft has the new driver ready.  It will take some time as there is testing and an approval process before they put out a binary.
    viernes, 09 de marzo de 2012 15:42
  • Great to know the team is working on this! PHP 5 with IIS 7 + MSSQL Driver is a real good and solid alternative! And PHP 5.4 has a few additions that are really interesting. So will be waiting eagerly :) Thanks for the efforts.
    domingo, 11 de marzo de 2012 3:35
  • We are looking forward for this release.

    Thanks,

    Defigo

    lunes, 12 de marzo de 2012 12:04
  • You can download sqlsrv-5.4-ts-snap.zip and sqlsrv-5.4-nts-snap.zip at http://downloads.php.net/pierre/
    miércoles, 14 de marzo de 2012 1:49
  • You can download sqlsrv-5.4-ts-snap.zip and sqlsrv-5.4-nts-snap.zip at http://downloads.php.net/pierre/

    Please note that these appear to be 2.0 drivers, rebuilt with 5.4 support. They are not officially supported, nor do I know how they were compiled. I'm pretty sure Pierre Joye only made the changes necessary to support PHP 5.4, but I can't tell from looking at the package. :)

    Cheers,

    Jonathan


    This posting is provided 'AS IS' with no warranties, and confers no rights.

    miércoles, 14 de marzo de 2012 2:51
  • I did a build for version 3.0 of the driver for php 5.3 and 5.4.

    Build is 32-bit, non-thread-safe, on VC9, taken from the latest source posted on Codeplex.

    It is labelled unofficial, and I don't want to upset anyone at MSFT, but I modified the source so that it works with any version (9.0, 10.0 or 11.0) of the SQL Server Native Client, and compiles with any version of PHP 5.3 or higher:

    • PHP itself will decide if it's built on a compatible version, so I don't think there's any need to restrict it in the source code.
    • I still have computers that cannot install the 2012 Native Client.  Considering it's only a client, it's the wrong decision by Microsoft to block it on XP/2003.
    • A very important bug was discovered by Lars, the old driver version 2.0 must be used with caution, and avoided where possible.

    So this was built out of necessity, and the fewest possible changes were made - unfortunately I did not change the message that refers to the 2011 Native Client (should say 2012?) because I didn't realise at the time.

    There was also a strange line that wouldn't compile in pdo_sqlsrv, which I modified: pdo_dbh.cpp(36)

    Here is the download link, including the source: [deleted]


    Rob

    Alternative download here: [deleted]

    Yesterday I noticed my ISP "Demon Internet" trying to intercept traffic to Mediafire with a bogus SSL certificate.  Nice of them, and probably illegal too.

    New link: http://sdrv.ms/M5qhTF




    miércoles, 14 de marzo de 2012 12:09
  • I did a build for version 3.0 of the driver for php 5.3 and 5.4.

    Build is 32-bit, non-thread-safe, on VC9, taken from the latest source posted on Codeplex.

    It is labelled unofficial, and I don't want to upset anyone at MSFT, but I modified the source so that it works with any version (9.0, 10.0 or 11.0) of the SQL Server Native Client, and compiles with any version of PHP 5.3 or higher:

    • PHP itself will decide if it's built on a compatible version, so I don't think there's any need to restrict it in the source code.
    • I still have computers that cannot install the 2012 Native Client.  Considering it's only a client, it's the wrong decision by Microsoft to block it on XP/2003.
    • A very important bug was discovered by Lars, the old driver version 2.0 must be used with caution, and avoided where possible.

    So this was built out of necessity, and the fewest possible changes were made - unfortunately I did not change the message that refers to the 2011 Native Client (should say 2012?) because I didn't realise at the time.

    There was also a strange line that wouldn't compile in pdo_sqlsrv, which I modified: pdo_dbh.cpp(36)

    Here is the download link, including the source: http://www.mediafire.com/download.php?duiz4701sqzjhhd


    Rob

    Hi Rob,

    Thanks for putting this up! Everyone, please keep in mind that SQL Server 2012 features require SNAC 11 and will therefore not work if you use any older versions of SNAC.

    Also, the necessary notification for everyone: We do not support this release, so please use at your own risk.

    We hope to have a 5.4-capable release very soon!

    Thanks!

    Jonathan


    This posting is provided 'AS IS' with no warranties, and confers no rights.

    miércoles, 14 de marzo de 2012 18:49
  • Rob, tried in my home IIS 7 on Windows 7, SQL Express 2008, ADODB 5.15, PHP 5.4 from http://windows.php.net/download/ and your modified drivers. Installed it on my intranet small application and works fine! Great preview. Thanks.
    jueves, 15 de marzo de 2012 1:54
  • Hi everyone,

    We've enabled support for PHP 5.4, as well some other bug fixes. You can find the new download at the normal location:

    http://www.microsoft.com/download/en/details.aspx?id=20098

    Cheers,

    Jonathan


    This posting is provided 'AS IS' with no warranties, and confers no rights.

    jueves, 22 de marzo de 2012 23:03
  • The files in the package at http://www.microsoft.com/download/en/details.aspx?id=20098 have old dates and I get errors about the module version not matching (2009xxxx in the package) while php 5.4 uses (2010xxxx).  Maybe the wrong package was uploaded?

    SQLSRV2.0 files are from 11/10/2010 1:18pm

    SQLSRV3.0 files are from 2/13/2012 2:37pm

    viernes, 23 de marzo de 2012 13:42
  • The files in the package at http://www.microsoft.com/download/en/details.aspx?id=20098 have old dates and I get errors about the module version not matching (2009xxxx in the package) while php 5.4 uses (2010xxxx).  Maybe the wrong package was uploaded?

    SQLSRV2.0 files are from 11/10/2010 1:18pm

    SQLSRV3.0 files are from 2/13/2012 2:37pm

    Hi Marques,

    The file may simply not have been fully mirrored to the server you were downloading from. What is the build number of the DLL you are looking at, and when were they signed?

    You are looking for build number: 3.0.3421
    Signed timestamp: Thursday, March 22, 2012 10:35:47AM

    Cheers,

    Jonathan


    This posting is provided 'AS IS' with no warranties, and confers no rights.

    viernes, 23 de marzo de 2012 17:03
  • Thank you very much for the fast turnaround time on this!  Works perfect!

    Here's the steps I did: Using Windows Server 2008 R2 (64-bit) with IIS.  Downloaded the new sqlsrv3 package and extracted it; installed php 5.4, added php_sqlsrv_54_nts.dll to the ext dir and updated the php.ini to point to the new php_sqlsrv_54_nts.dll.

    viernes, 23 de marzo de 2012 17:39
  • Ouch. Chrome was caching it.  Even if I refreshed the download page and opened an incognito window.  I had to download it in another browser to get around the cache.. Opera to the rescue :-)

    Everything looks good now, thanks.

    viernes, 23 de marzo de 2012 17:45
  • There is so much legacy MSSQL module use around, is there any chance of getting an official PHP 5.4 rebuilt version of the MSSQL driver - or a SQLSRV/MSSQL wrapper (either  a dll module or a PHP file)?

    viernes, 23 de marzo de 2012 17:56
  • Great to hear that everything is working! :)

    Cheers,

    Jonathan


    This posting is provided 'AS IS' with no warranties, and confers no rights.

    viernes, 23 de marzo de 2012 17:56
  • Also note that I'm using this new driver with SQL Azure, no problems so far with the new extension!!
    viernes, 23 de marzo de 2012 18:13
  • There is so much legacy MSSQL module use around, is there any chance of getting an official PHP 5.4 rebuilt version of the MSSQL driver - or a SQLSRV/MSSQL wrapper (either  a dll module or a PHP file)?

    Hi Marques,

    The MSSQL driver is not an officially-supported driver, and relies on some very old libraries which are also no longer supported.

    I will keep your suggestion for a wrapper in mind for future releases, but a wrapper would most likely cause more issues than simply porting an application to use the SQLSRV driver. I understand the biggest blocker is Linux support, and that is something we understand is a big ask from the community in order to negate the requirement to use the MSSQL driver. Keep your eye out in the future for updates on this. :)

    Thanks,

    Jonathan


    This posting is provided 'AS IS' with no warranties, and confers no rights.

    viernes, 23 de marzo de 2012 18:24
  • Thanks a lot to the Team!!! Deployed and works well, my intranet application is running fine so far.

    Config: ADODB 5.15 over PHP 5.4,WIN7X64/IIS7.5,  SQLServer2008 Express database, Native Client 2012.

    • Editado charly sa domingo, 25 de marzo de 2012 23:32 EDIT
    domingo, 25 de marzo de 2012 23:30
  • Hi Jonathan,

    Is there a version of the driver that can be installed on an XP computer with PHP 5.4 and SQL Server 2008?  The PHP 5.4 release announcement says it will still support XP, but I can't find any version in the 2.0 or 3.0 downloads that is listed for PHP5.4 (in the Installation section of the SQLSRV_Readme.htm).  I downloaded both SQLSRV20.EXE and SQLSRV30.EXE from http://www.microsoft.com/download/en/details.aspx?id=20098

    Thanks

    viernes, 30 de marzo de 2012 18:56
  • Tony,

    Unfortunately, we rely on the SQL Server Native Access Client 2012 to function, which is not supported on Windows XP. The 2.0 driver will continue to function on XP, but only for PHP 5.3.x.

    Thanks,

    Jonathan


    This posting is provided 'AS IS' with no warranties, and confers no rights.

    viernes, 30 de marzo de 2012 20:25
  • Unfortunately, we rely on the SQL Server Native Access Client 2012 to function, which is not supported on Windows XP. The 2.0 driver will continue to function on XP, but only for PHP 5.3.x.

    Hi Jon! it would have been nicer to have it working on XP too and to serve the multiple SNACs in a single piece of code, but I understand anyway, as PHP5.4/SQL2008/SNAC2012 is ok in Windows 7 I can work fine, however I think I read that SQL Server 2012 requires 2008 server/Win7 minimum right? So that leaves out my Win2003 server, that is a pity indeed.

    I'll have to wait to upgrade that one to have the whole package. SQL2012 if only for the OFFSET/FETCH option for pagination is very tempting.

    domingo, 01 de abril de 2012 19:04
  • Hi charly sa,

    The OFFSET/FETCH functionality will work fine with older versions of SNAC as well. :)

    Cheers,

    Jonathan


    This posting is provided 'AS IS' with no warranties, and confers no rights.

    lunes, 02 de abril de 2012 0:35
  • The OFFSET/FETCH functionality will work fine with older versions of SNAC as well. :)

    Hi Jon, but I still need SQL2012Express right, and as far as I know it won't install on Win2003 server.. Or am I missing something?

    Thanks!

    miércoles, 04 de abril de 2012 22:52
  • charly sa,

    Sorry, I assumed that you were separating your application server from your database server. Yes, that is correct, you cannot install SQL Server 2012 on Windows Server 2003.

    Thanks,

    Jonathan


    This posting is provided 'AS IS' with no warranties, and confers no rights.

    miércoles, 04 de abril de 2012 23:15
  • Hey. Thank you for your driver. 

    Unfortunately, PHP5.4.3 TS doesn't seem to be able to load SQLSRV 3.0 on Windows Server 2008 R2

    php_error.log says following: 

    [10-Jun-2012 21:31:56 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\php\ext\php_sqlsrv_54_ts.dll' - %1 is not a valid Win32 application.
     in Unknown on line 0

    There's SQL 2012 Native Client Installed

    PHP binaries are compiled using VC9.

    What am I doing wrong?

    Thanks in advance.

    domingo, 10 de junio de 2012 22:08
  • Sorry this is not an answer - it might be best to start a new question on this, this thread's already been 'answered'.

    Rob

    domingo, 10 de junio de 2012 22:33
  • Darquan

    If you are using IIS7 then you need to use the nts version php_sqlsrv_54_nts.dll.

    If you are using Apache on Windows 2008R2 then you use the ts version php_sqlsrv_54_ts.dll.

    Hope that helps.

    John Plavocos

    martes, 26 de junio de 2012 4:02