简体   繁体   English

Symfony2,从Linux连接到SQLServer

[英]Symfony2, connect to SQLServer from Linux

I have this configuratión on my parameters.ini: 我在parameters.ini上有此配置:

[parameters]
    database_driver="pdo_sqlsrv"
    database_host="SERVSGBD"
    database_port=""
    database_name="sqlserver"
    database_user="usr_gitekrrhh"
    database_password="gi$1po(5g."

    mailer_transport="smtp"
    mailer_host="localhost"
    mailer_user=""
    mailer_password=""

    locale="en"

    secret="dcbd3a1edfce4c17bd1b36c34fbdd8b10"

When I check if it is working, for example with this command: 当我检查它是否正常工作时,例如使用以下命令:

php app/console doctrine:mapping:convert yml ./src/Acme/BlogBundle/Resources/config/doctrine/metadata/orm --from-database --force

I´m getting this error: 我收到此错误:

  [PDOException]         
  could not find driver

Any help or clue? 任何帮助或线索?

Have you look at this: 你看这个吗?

Connecting to mssql using pdo through php and linux 通过php和linux使用pdo连接到mssql

I think this is solution for you. 我认为这是您的解决方案。

u need to tell your conifiguration file where to find the PDO Driver for connecting to the Database :) 您需要告诉您的配置文件在哪里可以找到用于连接数据库的PDO驱动程序:)

Connecting to mssql using pdo through php and linux 通过php和linux使用pdo连接到mssql

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM