Linux - PHP 7.0 and MSSQL (Microsoft SQL)

后端 未结 9 1069
夕颜
夕颜 2020-12-02 09:08

Yes, I know that PHP 7.0 removed the extensions needed to connect to MSSQL. FreeTDS was my option prior to PHP 7.0 but now there really is no obvious upgrade path for those

9条回答
  •  半阙折子戏
    2020-12-02 09:29

    I definitely agree with you. I work primarily with SQL Servers at work and do not understand why they are not including default drivers for SQL servers in PHP.

    For linux, i'm not too sure what you previously used but I found that the "dblib" driver is the best driver to connect to SQL Servers.

    But basically for a linux box you just want to run these few steps to have a sql server driver installed.

    apt-get install freetds-dev -y
    vim /etc/freetds.conf
    

    Then go ahead and add your connections there and restart apache and you should be good to go!

提交回复
热议问题