我正在尝试确定在PHP 7上运行的App Services下的Azure Web App是否随附Oracle数据库的支持和驱动程序?
谢谢!
谢尔盖
如果您在Windows上使用Azure WebApp,请参阅MSDN官方博客Access Oracle Databases from Azure Web Apps using OCI8 drivers with PHP
了解如何操作。
否则,您可以参考我对其他SO线程Access Oracle Databases from Azure Web Apps using OCI8 drivers with PHP
的答复以启用Enable PHP Extension (php_odbc.dll) on Azure扩展,然后按照文档php_odbc
在PHP中使用ODBC连接Oracle。
[如果您在Linux上使用Azure WebApp,则以上用于在PHP中使用ODBC连接Oracle的文档也适用于Linux。
或者您需要参考官方文件Connecting to Oracle from PHP using ODBC Driver for Oracle
通过在Ubuntu映像上添加命令Connecting to Oracle from PHP using ODBC Driver for Oracle
来安装Configure a custom Linux container for Azure App Service
(因为默认的Alpine映像没有Configure a custom Linux container for Azure App Service
软件包),然后使用[C0通过命令pecl
安装RUN apt install php-pear
。这些都在Dockerfile中配置。