3.配置sqlserver a. 运行 SQL Server 配置管理器:SQL Server Configuration Manager,打开协议 Protocols b. 允许命名管道 "named pipes" 和 "tcp/ip" c. 右键点击 "tcp/ip",打开属性 Properties 标签 "IP 地址" d. 在 TCP 动态端口 "TCP Dynamic Ports" 填入 1433,注意分配正确的IP地址。 e. 重启 SQL Server
二、Linux下php连接sql server 2005 1、首先根据需要安装LAMP环境中的除php外其他组件。 在Linux中使用freetds连接MS SQL 安装freetds ./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix --with-gnu-ld --enable-shared --enable-static make make install 重要提示一:这一步需要注意的是--with-tdsver
2、配置freetds server2005对应的tds version是7.2(貌似网上能查到的都写8.0) 配置/usr/local/freetds/etc/freetds.conf # A typical Microsoft server [1.1.1.21] host = 1.1.1.21 port = 1433 tds version = 7.0 重要提示:在调用mssql_connect函数时,需要注意的是,其第一个参数应该是[1.1.1.21](即在freetds.conf里的配置),而不是sql server的IP!