【问题标题】:Azure Functions PHP The system cannot find the file specifiedAzure Functions PHP 系统找不到指定的文件
【发布时间】:2018-07-16 08:14:57
【问题描述】:

突然间,我的所有 PHP 函数在一个应用服务消费计划中停止在 Azure Functions 上运行。几天后,我的其他运行 PHP 的 Azure Function Apps 也发生了同样的情况。

完整的错误信息:

[Info] Function started (Id=01a3bb97-a5a3-49d9-8a13-ac7330fcb9d0)
[Error] Exception while executing function: Functions.NAME. System: The system cannot find the file specified.
[Error] Function completed (Failure, Id=01a3bb97-a5a3-49d9-8a13-ac7330fcb9d0, Duration=120ms)

Node 等其他语言似乎仍然有效。

【问题讨论】:

    标签: php function azure


    【解决方案1】:

    在调查此问题时,我偶然发现了文件夹 D:\Program Files\FixPHP72x64,其最后修改日期等于我的函数开始失败的时间范围。它包含一个修改 PHP 运行时的脚本以及一个指示该脚本已运行的输出文件。

    我联系了 Microsoft Azure 支持,他们承认问题是由于他们所做的更改造成的。幸运的是,由于 PHP 支持仍处于预览阶段,他们确实认为该问题是一种回归,他们将致力于解决方案。

    在此之前,他们会提供临时解决方法:

    按照此处的说明进行操作 https://github.com/Azure/azure-functions-host/wiki/Using-a-custom-version-of-Python 并复制 https://windows.php.net/downloads/releases/php-7.2.7-Win32-VC15-x64.zip 而不是 python 到site\tools

    此解决方法确实会将 php.ini 配置重置为默认值,因此您可能需要更改 php.ini 中的一些内容:

    cd D:\home\site\tools
    cp php.ini-production php.ini
    

    然后对 php.ini 文件进行所需的更改。

    【讨论】:

    • 救命稻草...虽然 GitHub 页面上的说明还有很多不足之处。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-05-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-21
    相关资源
    最近更新 更多