Heroku PHP MSSQL 扩展/SQL_SRV

Heroku PHP MSSQL Extesion/ SQL_SRV

如何在 Heroku 上添加 sql_srv.so 扩展? 我现在失去希望了,

没有关于此的扩展,而且 Asure 不是免费的, 我所需要的只是它的驱动程序来与第三方数据库一起工作, 我怎样才能实现它?

或者是否有任何 link 可以阅读如何在其 php.ini 上添加自定义 php 扩展?

我正在使用 Laravel Lumen 7.2.1 PHP版本是7.3^

目前,Heroku 不支持 SQL 服务器扩展。来自 official website PHP heroku 上的 7.3 仅支持以下 SQL 扩展名:

  • MySQL (PDO)(使用 mysqlnd)
  • MySQLi(使用 mysqlnd)
  • PostgreSQL
  • PostgreSQL (PDO)

来自 github issue 他们说:

We currently have no plans to support that. mssql is no longer available in PHP 7, so there is only ODBC left as an option, and that's a bit of a nightmare to set up on Linux.

和最新的issue

There are two reasons why this hasn't happened yet:

  • we need the underlying ODBC driver libraries and in fact the entire ODBC ecosystem on all stacks first (and 20.04 isn't supported yet by Microsoft, but we have that in internal beta already);
  • https://odbceula.blob.core.windows.net/eula17/LICENSE17.TXT needs to be looked at by lawyers, and that takes time, as you might expect.