与symfony 2和Propel的SQL Server连接

时间:2014-11-06 15:53:04

标签: sql-server symfony propel

我已经在symfony 2.3上安装了propel orm软件包,我在app / config / config.yml文件中配置了它,如下所示:

propel:
    dbal:
        default_connection:         symfony
        connections:
            symfony:
                driver:               sqlsrv
                user:                 null
                password:             null
                dsn:       sqlsrv:server=%database_host%;Database=%database_name%

我为sql server使用“sqlsrv”驱动程序,它已正确安装在我的php文件夹中。

我的用户和密码字段为空,因为我使用Windows身份验证。我已经用doctrine检查了这个配置,它可以工作,我可以在数据库上连接:

doctrine:
    dbal:
        driver:   sqlsrv
        host:     "%database_host%"
        dbname:   "%database_name%"
        user:     null
        password: null
        charset:  UTF8

但是使用推进器我无法连接此配置,你能帮帮我吗?

(我在控制台上检查了这个命令: php app / console propel:database:create 我有这条消息“找不到数据库名称”

由于

0 个答案:

没有答案