原文 Unofficial Microsoft SQL Server Driver for PHP (sqlsrv)

Here are unofficial modified builds of Microsoft's sqlsrv and pdo_sqlsrv drivers for PHP, version 3.0, for:

  • PHP 5.6 for Windows Vista/2008 and above (32 and 64 bit)
  • PHP 5.5 for Windows Vista/2008 and above (32 and 64 bit)
  • PHP 5.3 and 5.4 for Windows XP/2003 and above (32 bit)
    Microsoft's
    version 3.0 driver does not run on XP/2003 because it has a hard-coded
    dependency on the SQL Server 2012 Native Client (ODBC driver), which
    will not install on XP.  To fix the problem I just had to allow the PHP
    driver to use an older version of the ODBC driver supported by XP.

Downloads

The latest drivers are exactly the same as Microsoft's, except:

  1. All known memory leak and memory exception bugs have been fixed *
  2. Column names can contain unicode characters
  3. The newest of any of these ODBC drivers is selected, depending on what's installed:
    1. SQL Server Native Client 12.0 (hasn't been invented as of June 2014!)
    2. SQL Server Native Client 11.0 (SQL Server 2012 ODBC driver)
    3. SQL Server Native Client 10.0 (SQL Server 2008/r2 ODBC driver)
    4. SQL Native Client (SQL Server 2005 ODBC driver)
  4. 64 bit versions included for PHP 5.5 and 5.6

Builds for PHP 5.3 and PHP 5.4 work on XP and above.

Builds for PHP 5.5+ only work on Windows Vista/2008 and above - PHP 5.5+
is built with the 2012 Visual C++ 11 compiler and it generates code
that works on Windows Vista and above.  I am comfortable with that - XP
has been superseded a long time ago, Windows 8.1 is absolutely great,
and don't forget that upgrading Windows also upgrades to a far better
web server in IIS 7.5 or 8.5.


It's never a good idea to look at the source code of things you like -
since I had to look, my new list of things to do includes writing a new
version of this driver.  It is a wrapper around the ODBC API, and has no
business making strict dependencies on any version of the SQL Server
Native Client.  It should even work with SQL Server 6, because there is
an ODBC driver for that too.  Furthermore, it's a pretty ugly bit of
code and every update is likely to introduce new bugs.  It's still a
better choice than using the PHP ODBC driver, as it's much faster in
returning data, it is multilingual (nchar and nvarchar), it supports the
majority of data types, and includes parameters.

* Sqlsrv changes
The sqlsrv driver has a fix to a bug found by Charles Durrant (http://sqlsrvphp.codeplex.com/workitem/22427)
which I too recently experienced when running PHP-32 on a 64 bit
server.  I noted Charles's post when he first reported the bug, but
tried my best to avoid working on the source code until I had to...
Charles saved me a huge amount of time, so thank you to him.  My fix is
different, I have repaired all of Microsoft's dodgy auto pointers and
completely rewritten the horrible function that caused the crash.  If
anyone uses these new builds and spots memory leaks or bugs due to these
changes, please let me know and I'll fix them within a day or two.

Microsoft's official downloads are here:

SQL Server Native Clients are here:

Unofficial Microsoft SQL Server Driver for PHP (sqlsrv)非官方的PHP SQL Server 驱动的更多相关文章

  1. PowerDesigner反向数据库时遇到[Microsoft][ODBC SQL Server Driver][SQL Server]无法预定义语句。SQLSTATE = 37错误解决方法

    逆向工程中,有时会出现如下错误 ... [Microsoft][ODBC SQL Server Driver][SQL Server]无法预定义语句 SQLSTATE = 37000 解决方案: 1. ...

  2. 连接SQLServer2005失败--[Microsoft][ODBC SQL Server Driver][DBNETLIB]一般性网络错误。请检查网络文档

    连接SQLServer2005失败,错误信息: 错误类型:Microsoft OLE DB Provider for ODBC Drivers (0x80004005)[Microsoft][ODBC ...

  3. [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server 不存在或访问被拒绝

    一般连接sql数据库,IP_connstr="driver={SQL Server}; server=127.0.0.1;database=数据库名字;uid=sa;pwd=密码" ...

  4. SQL Server Driver for PHP之sqlsrv相关函数

    SQL Server Driver for PHP 包含以下函数: 函数 说明 sqlsrv_begin_transaction 开始事务. sqlsrv_cancel 取消语句:并放弃相应语句的所有 ...

  5. 使用SQL Server Driver for PHP解决PHP连接MSSQL乱码的问题

    原文 使用SQL Server Driver for PHP解决PHP连接MSSQL乱码的问题 最近帮客户写了一个.net商城网站的发布接口,大家都知道.net一般都使用MSSQL数据库,但鱼丸不会. ...

  6. Add Microsoft SQL JDBC driver to Maven(转)

    from:http://claude.betancourt.us/add-microsoft-sql-jdbc-driver-to-maven/ Add Microsoft SQL JDBC driv ...

  7. Kettle建立数据库链接报错-'MS SQL Server' driver (jar file) is installed. kettle的bug,对于12.2而言

    1.链接sql server数据库报错 错误连接数据库 [My_vm_win_sql] : org.pentaho.di.core.exception.KettleDatabaseException: ...

  8. [Oracle][ODBC SQL Server Driver][SQL Server]对象名 'RECOVER.HS_TRANSACTION_LOG' 无效(转)

    原帖由 qingyun 于 2010-6-21 15:44 发表 在写pl/sql的时候,有个很重要的注意点:比如:begin  update  某个sqlserver的表@dblink名字 .... ...

  9. SQL Server在本地计算机上用SSMS(SQL Server Management Studio)登录不上,错误消息:(Microsoft SQL Server, Error: 18456)

    今天遇到了一个奇怪的问题,公司目前在SQL Server上都采用AD域账号登录,由于账号人数众多,所以我们建立了一个AD Group(域组),将大家的AD账号加入了这个AD Group,然后我们将这个 ...

随机推荐

  1. aauto攫http数据

    说明:灵巧使用上述数据的抓取网页简单的例子. 样例:想把某站点的数据抓回来.然后保存在数据库里边. 步骤:1.打开sql.new一个数据库Test.新建一个表test. 2.打开快手.准备抓数据,以这 ...

  2. BZOJ 1901 Dynamic Rankings 树董事长

    标题效果:间隔可以改变k少 我的两个天树牌主席... 隔断Count On A Tree 之后我一直认为,随着树的主席的变化是分域林木覆盖率可持久段树. .. 事实上,我是误导... 尼可持久化线段树 ...

  3. SQL Server 2008 (R2) 单机版安装的先决条件

    原文:SQL Server 2008 (R2) 单机版安装的先决条件 出自:http://blogs.msdn.com/b/apgcdsd/archive/2012/03/07/sql-server- ...

  4. MyEclipse调整项目的顺序

    MyEclipse该项目是按照字母顺序排列的项目名称,无法调整. 例,我现在做Photo工程项目,向下位置,非常不方便: 可是,它有一个将项目分组的功能"Working Sets" ...

  5. Unicode字段也有collation

    原文:Unicode字段也有collation 转自:http://blogs.msdn.com/b/apgcdsd/archive/2011/01/11/unicode-collation.aspx ...

  6. js之第三方工具解析JSON

    1.JSON 仅仅是一种文本字符串.它被存储在 responseText 属性中 为了读取存储在 responseText 属性中的 JSON 数据,须要依据 JavaScript 的 eval 函数 ...

  7. SQLite外键

    数据库工具:SQLite Manager(V0.7.7) SQLite版本号:V3.6.19+ SQLite Manager 默认是不开启外键的. 那么怎样,使用它创建一个带有外键的表呢? 一.开启外 ...

  8. EnumMap demo

    优点:常量做为Key,在编译期就确定了.Enum做为key,在运行时也可以改变 package enumdemo; import java.util.EnumMap; import java.util ...

  9. SSL/TLS协议运行机制的概述(转)

    互联网的通信安全,建立在SSL/TLS协议之上. 本文简要介绍SSL/TLS协议的运行机制.文章的重点是设计思想和运行过程,不涉及具体的实现细节.如果想了解这方面的内容,请参阅RFC文档. 一.作用 ...

  10. (大数据工程师学习路径)第一步 Linux 基础入门----简单的文本处理

    介绍 这一节我们将介绍这几个命令tr(注意不是tar),col,join,paste.实际这一节是上一节关于能实现管道操作的命令的延续,所以我们依然将结合管道来熟悉这些命令的使用. 一.常用的文本处理 ...