最近在开发通达OA的模块,需要调用其他服务器上的数据,包括MSSQL和Oracle。访问Oracle数据库的问题已经解决,就是安装Oracle客户端,并使用php_oracle.dll组件。但是访问MSSQL还未解决,已经找到了php_mssql.dll这个文件,49k,但是无法使用,可能需要安装MSSQL的客户端程序。也下载了一个SQLServerDriverForPHP11.EXE,解压出来几个dll文件,我在开发环境下,安装了MSSQL2008的情况下可以使用,但是不知道在实际生产服务器上需要安装什么客户端软件,谁提醒下我。

解决方案 »

  1.   

    1:需要php.ini中的 ;extension=php_mssql.dll前的分号";"去掉。2:将php_mssql.dll,ntwdblib.dll拷贝到系统目录\system32下重启测试。。windows的话,试试这个
      

  2.   

    实际生产环境下,如果数据库服务器和WEB服务器在一台物理机器上,装个完整的mssql
    如果不在一个物理的服务器上,装个客户端,能正常访问数据库服务器就可以了。
      

  3.   

    Requirements
    Requirements for Win32 platforms. The extension requires the MS SQL Client Tools to be installed on the system where PHP is installed. The Client Tools can be installed from the MS SQL Server CD or by copying ntwdblib.dll from \winnt\system32 on the server to \winnt\system32 on the PHP box. Copying ntwdblib.dll will only provide access through named pipes. Configuration of the client will require installation of all the tools. This extension is not available anymore on Windows with PHP 5.3 or later. SqlSrv, an alternative driver for MS SQL is available from Microsoft: » http://www.microsoft.com/sqlserver/2005/en/us/PHP-Driver.aspx. The documentation is available at » http://msdn.microsoft.com/en-us/library/cc296221.aspx Requirements for Unix/Linux platforms. To use the MSSQL extension on Unix/Linux, you first need to build and install the FreeTDS library. Source code and installation instructions are available at the FreeTDS home page: » http://www.freetds.org/ 
      

  4.   

    MSSQL服务器的版本是SQLSERVER2000,谁提供一个客户端工具的下载链接。