locked
[PHP][Web Apps] PHP Selection Error RRS feed

  • Question

  • From: @Spinal83 via Twitter

    When I switch to PHP 5.6 phpinfo says I’m running 5.5 and vica versa. I have switched it around a couple of times, this is definitely reproducible for me. For what it worth just checked, setting it to 5.4 also uses 5.5

    I get the same result in Chrome, Edge, and Opera. 

    Regards,

    @AzureSupport





    Saturday, July 11, 2015 3:20 AM

Answers

  • We took a look at sander2 site and it seems the problem is that you override HTTP handlers in your web.config file (so settings from portal are suppressed). Please try to remove that section and check again. Everything should be ok then. Let us know if it is not that case.

    Thanks,
    Petr

    Tuesday, July 14, 2015 7:32 PM

All replies

  • Hi,

    Is it your azure web app running on PHP says you are running 5.5 ?

    Could you share the exact error message and a screen shot . Also, have you tried in Internet explorer version 11 ?

    Awaiting your response.

    Regards,

    Shirisha Paderu

    Saturday, July 11, 2015 8:57 AM
  • There's no error message, it just doesn't work as expected. Link is on my Twitter URL-to-twitter/Spinal83/status/616158848936751104) as I can't post images or links here :/

    As you can see, if I select PHP 5.5 in Azure, phpinfo() reports it's running 5.6. If I switch to 5.6, phpinfo says I'm running 5.5.

    I can reproduce this in both PHP web apps in my account. It doesn't matter which browser I do this in (just for you, I tried in IE11 and gives the same result)

    FWIW, when I click Save, Azure does a POST request to https://manage.windowsazure.com/Websites/UpdateConfig , in the request parameters I can see siteConfig.PhpVersion is set to the correct value, so it's not the frontend that does something wrong.

    Saturday, July 11, 2015 1:55 PM
  • Hi,

    I would suggest you to try configuring using Azure PowerShell and check if the same thing happens.

    Please check the below link for how to configure php versions using PowerShell:

    https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-configure/

    Regards,
    Sunil.HP

    Saturday, July 11, 2015 5:03 PM
  • Hi Dani,

    Would you be able to provide a site name? Feel free to create a test site (if you can repro it there) and send just that one.

    I tried to repro it and it does not happen to me, so there must be something special.

    Thanks,
    Petr

    Monday, July 13, 2015 5:12 PM
  • Hi Dani,

    Would you be able to provide a site name? Feel free to create a test site (if you can repro it there) and send just that one.

    I tried to repro it and it does not happen to me, so there must be something special.

    Thanks,
    Petr

    http://sander2.azurewebsites.net/i.php
    https://dashboard.shore2ship.com/i.php

    shore2ship is set to 5.6 in Azure, sander2 is set to 5.5 in Azure.

    Tuesday, July 14, 2015 9:30 AM
  • Perfect, we are on it.

    Thanks,
    Petr

    Tuesday, July 14, 2015 4:38 PM
  • We took a look at sander2 site and it seems the problem is that you override HTTP handlers in your web.config file (so settings from portal are suppressed). Please try to remove that section and check again. Everything should be ok then. Let us know if it is not that case.

    Thanks,
    Petr

    Tuesday, July 14, 2015 7:32 PM
  • Well, if I remove that section, my UPDATE and DELETE calls won't work anymore, so removing that is not an option unless there is an other way to enable them. Using <verbs> as explained on the IIS website (configreference/system.webserver/security/requestfiltering/verbs) does not work.
    Tuesday, July 21, 2015 7:27 AM
  • I see. We'll look into that. For now the only workaround for you I believe is to keep your section in web.config and make sure that you point to the right version of PHP (the same one selected in portal).
    Wednesday, July 22, 2015 6:28 PM
  • <handlers>
      <remove name="PHP55_via_FastCGI" />
      <add name="PHP55_via_FastCGI" path="*.php" verb="GET, PUT, POST, DELETE, HEAD, OPTIONS, TRACE, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK" modules="FastCgiModule" scriptProcessor="D:\Program Files (x86)\PHP\v5.5\php-cgi.exe" resourceType="Either" requireAccess="Script" />
      <remove name="PHP56_via_FastCGI" />
      <add name="PHP56_via_FastCGI" path="*.php" verb="GET, PUT, POST, DELETE, HEAD, OPTIONS, TRACE, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK" modules="FastCgiModule" scriptProcessor="D:\Program Files (x86)\PHP\v5.6\php-cgi.exe" resourceType="Either" requireAccess="Script" />
    </handlers>

    Seems right to me... 5.5 points to 5.5 and 5.6 points to 5.6 :/

    Thursday, July 23, 2015 12:44 PM
  • I admit I am not an expert for PHP, so maybe one weird question - why do you need to have two handlers for two difference versions? Why don't you leave there just the one you need and that would be the version selected in the portal?
    Thursday, July 23, 2015 2:34 PM