PHP5.4 连接 SQL SERVER 2008
2014-10-25 23:49
411 查看
PHP链接sqlserver需要先安装驱动,不是先把dll放到ext下面,一重启服务器就完事了。
本地环境:
XAMPP 1.8.2
PHP 5.4.31
SQL SERVER 2008 R2
使用的DLL
php_sqlsrv_54_ts.dll
php_pdo_sqlsrv_54_ts.dll
当前报错:
也就是说机器上需要安装驱动。
根据这个帖子地址 的介绍 报错信息有误,应该下载x64。
到这个 地址
点开Install Instructions
下载 Microsoft® SQL Server® 2012 Native Client
下载这个4M多的sqlncli.msi。
官方论坛地址:https://social.technet.microsoft.com/Forums/sqlserver/en-US/home?forum=sqldriverforphp&sort=relevancedesc&brandIgnore=True&searchTerm=php5.4+sql+server+2008
本地环境:
XAMPP 1.8.2
PHP 5.4.31
SQL SERVER 2008 R2
使用的DLL
php_sqlsrv_54_ts.dll
php_pdo_sqlsrv_54_ts.dll
当前报错:
Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [message] => This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712 ) )
也就是说机器上需要安装驱动。
根据这个帖子地址 的介绍 报错信息有误,应该下载x64。
到这个 地址
点开Install Instructions
下载 Microsoft® SQL Server® 2012 Native Client
下载这个4M多的sqlncli.msi。
官方论坛地址:https://social.technet.microsoft.com/Forums/sqlserver/en-US/home?forum=sqldriverforphp&sort=relevancedesc&brandIgnore=True&searchTerm=php5.4+sql+server+2008
相关文章推荐
- 64位IIS7下的PHP 5.4配置及如何连接SQL Server 2008
- 64位IIS7下的PHP 5.4配置及如何连接SQL Server 2008
- Linux下php连接sql server 2008
- php连接sql server 2008数据库
- php连接sql server 2008案例
- [置顶] PHP连接SQL Server 2008
- PHP 5.3连接sql server 2008 R2
- PHP5.6.15连接Sql Server 2008配置方案
- PHP5.6.15连接Sql Server 2008配置方案
- Linux下php连接sql server 2008
- PHP连接SQL Server 2005 和 SQL Server 2008【草案】
- lumen5.4、PHP5.6+、win32、apache2.4+连接sql server配置
- PHP5.6.15连接Sql Server 2008配置方案
- php 连接 SQL Server 2008
- php 连接 SQL Server 2008
- PHP 5.4 成功连接 SQL Server 2005
- PHP连接SQL Server 2005 和 SQL Server 2008
- PHP连接SQL Server 2005 和 SQL Server 2008【草案】
- 关于PHP5.6连接SQL Server 2008 R2数据库驱动及一些问题
- 使用JDBC连接SQL SERVER 2008的方法