CodeIgniter MSSQL connection

前端 未结 2 968
春和景丽
春和景丽 2020-11-28 12:17

I\'m working on a web project that is to be deployed on a 64bit Windows 2008 Server machine running IIS 7.5 and PHP 5.3.8. The database on the system is Microsoft SQL Server

相关标签:
2条回答
  • 2020-11-28 12:55

    The error you are showing for the SQLSRV driver implies the DLL is never loading. What does your php_info() say?

    Also, do you have the SQL Server Native Access Client (SNAC) 10 installed? The SQLSRV driver requires it.

    0 讨论(0)
  • 2020-11-28 13:13

    For x86 win download http://www.microsoft.com/en-us/download/details.aspx?id=20098 for using with:

    $db['default']['dbdriver'] = 'sqlsrv';
    use the php_sqlsrv_XX_ts_vcX.dll in php.ini extension
    

    if your webserver and your database server are not on same server with your app, install this:

    http://go.microsoft.com/fwlink/?LinkID=188400&clcid=0x409
    

    and for linux as webserver:
    $db['default']['dbdriver'] = 'mssql';

    download & install = php5-sybase + freetds
    <br/>edit /usr/local/etc/freetds.conf
    <br/>create pdo_dblib.so & php_mssql.so (if not allready exist on your extension dir), and apply to php.ini
    
    sudo /etc/init.d/apache2 restart
    

    and just dont forget to allow connection to your DB (default port for mssql is 1433)

    0 讨论(0)
提交回复
热议问题