none
PHP - Azure Functions Fails in Canada Central RRS feed

  • Question

  • When running the following I get the below error when running in Canada Central, but in US West or Canada East it runs without errors

    Any idea, I submitted a support ticket,  but PHP is considered a  experimental language so I could not get any support.

    <?php

     print "Hello World"
    ?>


    2018-07-10T04:45:53 Welcome, you are now connected to log-streaming service. 2018-07-10T04:45:58.518 [Info] Function started (Id=a31b6143-8753-45f5-8153-e43219efd406) 2018-07-10T04:45:58.612 [Error] Exception while executing function: Functions.TriggerPHP2. System: The system cannot find the file specified. 2018-07-10T04:45:58.659 [Error] Function completed (Failure, Id=a31b6143-8753-45f5-8153-e43219efd406, Duration=130ms)

    Tuesday, July 10, 2018 4:55 AM

All replies

  • Are you using an HTTP trigger or Queue Trigger? 

    Tuesday, July 10, 2018 8:12 PM
    Moderator
  • Queue Trigger

    They started to fail now in  US West and Canada East as well


    Wednesday, July 11, 2018 4:42 PM
  • So I tested what you are trying to do in East US and it worked: 

    2018-07-11T20:16:21  Welcome, you are now connected to log-streaming service.
    2018-07-11T20:16:23.540 [Info] Function started (Id=dbbf3a7d-3e87-48f5-ad26-7f0a340fbd70)
    2018-07-11T20:16:26.173 [Info] PHP script processed queue message 'sample queue data'
    2018-07-11T20:16:26.204 [Info] Function completed (Success, Id=dbbf3a7d-3e87-48f5-ad26-7f0a340fbd70, Duration=2661ms)
    2018-07-11T20:16:50.263 [Info] Function started (Id=55d4836f-f229-4e8f-aa26-d35cfea192e4)
    2018-07-11T20:16:50.482 [Info] Hello World
    2018-07-11T20:16:50.497 [Info] Function completed (Success, Id=55d4836f-f229-4e8f-aa26-d35cfea192e4, Duration=245ms)
    2018-07-11T20:16:53.154 [Info] Function started (Id=f6ac2098-d5b9-436a-bf78-37158b025c24)
    2018-07-11T20:16:53.341 [Info] Hello World
    2018-07-11T20:16:53.372 [Info] Function completed (Success, Id=f6ac2098-d5b9-436a-bf78-37158b025c24, Duration=209ms)

    I think tried it also in West US and saw the same thing you are seeing

    2018-07-11T20:20:22  Welcome, you are now connected to log-streaming service.
    2018-07-11T20:20:31.529 [Info] Function started (Id=07c4db51-8837-457f-94ed-65ac2b95392e)
    2018-07-11T20:20:31.607 [Error] Exception while executing function: Functions.QueueTriggerPHP1. System: The system cannot find the file specified.
    2018-07-11T20:20:31.639 [Error] Function completed (Failure, Id=07c4db51-8837-457f-94ed-65ac2b95392e, Duration=105ms)

    I dug around to find the best way to fix this problem. As you mentioned it is in the "Experimental" phase so finding support and fixes can be a bit of a struggle. I did find that the Functions team wants all issues related to PHP to be brought up here: 

    https://github.com/Azure/azure-functions-templates/issues

    This is where they are providing support for the experimental languages and would be able to suggest a fix/ work on the bug. 

    Alternatively, I would suggest trying East US as I found it to work and this could at least unblock you for now. 

    Hope that helps a bit. 


    Wednesday, July 11, 2018 8:22 PM
    Moderator
  • A regression was discovered which is responsible for this. The following steps will work around the issue:

    • Download PHP 5.6 (or whichever version you want) from here https://windows.php.net/downloads/releases/php-5.6.36-Win32-VC11-x86.zip
    • In Kudu, navigate to D:\home\site\tools creating the directory if it isn’t already there
    • Drag/Drop the PHP zip to this folder. After you’re done, php.exe should be at path d:\home\site\tools\php.exe
      • If there are any issues copying files, you may need to stop site, copy, then restart

    We are fixing the issue ASAP.


    Mathew Charles [MSFT]



    Monday, July 16, 2018 4:37 PM