2

Just use the Driver of Microsoft Github repo - it was already working with the beta and now they stabilized it - I forgot to "answer" the question here by myself - sorry for that delay. Link: Azure MSSQL

How is it possible to connect from symfony2.8 on PHP7 to a MSSQL server using ODBC connection?

Can't find anything in the net, except for some legacy stuff.

What needs to be changed / done? I know that Symfony offers odbc, can I still use doctrine as mapper when connecting through odbc?

user3746259
  • 1,491
  • 2
  • 23
  • 46
  • Try this https://stackoverflow.com/questions/11081993/connecting-doctrine-2-to-mssql-for-symfony-2-on-linux – gofr1 Mar 04 '16 at 12:59
  • 1
    Im using php7, thats why no sqlsrv driver will work, because there is none (except for an experimantial thats is not working either) – user3746259 Mar 04 '16 at 13:37
  • not possible, php7 required. Thats why I asked on how to setup odbc connection in symfony2 and not for sqlsrv extension. – user3746259 Mar 04 '16 at 14:03
  • There is an "early technical preview" of the PHP sqlsrv driver for Windows available on https://github.com/Azure/msphpsql/releases – gofr1 Mar 04 '16 at 18:25
  • I know, but it is not working well the database connection often times out, I cant even clear the cache due to the timeout – user3746259 Mar 04 '16 at 18:28
  • The mapping with doctrine is working(Schema update etc) but when opening the site or trying to clear the cache then timeout SQL Server. Because of that I hoped to get it to Work with odbc :/ – user3746259 Mar 04 '16 at 18:29
  • We've got the same issue. Have you try the New release (13 Juin 2016)? https://github.com/Azure/msphpsql/tree/PHP-7.0 – Angel115 Jun 16 '16 at 09:41
  • Hey Angel, I fixed it a while ago and updated the answer. In addition - please make sure that you use the correct php7 driver, e.g. 32 / 64bit, ts/nts...Because then it should also have worked for you when using the beta release. – user3746259 Jun 17 '16 at 06:34

1 Answers1

0

It is working, it already worked with the beta release

user3746259
  • 1,491
  • 2
  • 23
  • 46