2016-09-26 54 views
0

我试图将我的symfony 2应用程序连接到SQL SERVER数据库,一切正常使用SQL SERVER内部帐户,但我需要通过Windows连接我的应用程序帐户(例如使用在Web服务器上运行Apache服务的Windows用户)。使用Windows帐户将Symfony 2应用程序连接到SQL SERVER

有什么想法?

我想评论的用户/密码参数作曲家过程中自动生成的

此文件安装

parameters: 
    database_driver: pdo_sqlsrv 
# database_host: xxxxx 
    database_host: x.x.x.x 
    database_port: 1557 
    database_name: xxxxxx 
# database_user: xxxxx 
# database_password: "xxxxx" 

但我得到这个错误:

Fatal error: Uncaught exception 
'Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException' 
enter code here 
with message 'You have requested a non-existent parameter "database_user". 
Did you mean one of these: "database_driver", "database_host", 
"database_port", "database_name"?' in ... 

回答

0

我找到了解决方案:只需将database_user和database_password保留为空:

database_user: null 
database_password: null 
相关问题