locked
PHP upgrade best practice RRS feed

  • Question

  • User1723932646 posted

    What is the best practice to upgrade PHP (FastCGI) on IIS 7.x?

    My practice has been to extract a new PHP version to its own folder and get it configured there. Then go into IIS manager and change the Handler Mappings to point to the new location.

    My procedure works well and avoids downtime. But I'm wondering if this is best because of a setting I recently had to make. I needed to change settings using AppCmd like this:

    AppCmd set config /section:system.webserver/fastcgi /[fullPath='C:\php\php-5.3.11_nts\php-cgi.exe'].requestTimeout:360

    The problem is that my change affects PHP at only ONE location. This change won't carry over to future versions of PHP because they will be in a different folder.

    I thought about installing new PHP versions in the same folder as the one one, but how do you avoid downtime when switching over?

    Or is there a way to make settings apply to all FastCGI mappings?

    Thanks in advance for your thoughts.

    Cam

    Friday, September 7, 2012 1:29 PM

Answers

  • User-176674611 posted

    Based on my knowledge, the downtime is unavoidable unless you have failover for the site. For the same website, one server still load old version php when switching version on another server. For requestTimeout settings, it is per fastcgi instance basis so you can not make a global setting via appcmd. The only thing called "global" for this is the detault value set in iis schema, however, changing things in schema is not simple and NOT what recommended..

    Hope this helps, thanks.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, September 10, 2012 5:12 AM