【问题标题】:Symfony2 and Microsoft SQL Server on Mac and MAMPMac 和 MAMP 上的 Symfony2 和 Microsoft SQL Server
【发布时间】:2011-12-17 17:16:24
【问题描述】:

我打算在我的 Mac OSX 中使用 MAMP 开发一个 Symfony2 应用程序,但数据库(一个 Microsoft SQL Server 数据库)在另一台计算机上。

我设置了所有东西(我遵循了这个指令http://jesusomar.com/2011/07/22/mamp-php-and-mssql),如果我检查 phpinfo() 我看到 mssql 是活动的,但是我收到了这个错误:

[PDO异常]
找不到驱动

任何帮助或线索?提前致谢

【问题讨论】:

  • 你安装了 FreeTDS 吗?
  • 是的,我确实安装了它。但我怎么能确定呢?

标签: sql-server macos symfony mamp


【解决方案1】:

第一步是检查是否安装了 FreeTDS。您可以运行tsql -C 以获取有关您计算机中的 MSSQL 库的信息。你应该得到这样的东西:

Version: freetds v0.91
freetds.conf directory: /usr/local/Cellar/freetds/0.91/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 7.1
iODBC: no
unixodbc: no
SSPI "trusted" logins: no
Kerberos: no

如果未安装 FreeTDS,您可以使用 Homebrew(例如):brew install freetds

现在您可以使用MssqlBundle 连接您的数据库。

【讨论】:

    猜你喜欢
    • 2012-04-20
    • 2011-07-06
    • 1970-01-01
    • 2015-11-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多