Bobcares

Upgrade PHP on Windows – Do it with ease

by | Oct 15, 2020

Trying to upgrade PHP on windows? We can help you with it.

Here at Bobcares, we have seen several such Windows related queries as part of our Server Management Services for web hosts and online service providers.

Today we’ll see how to upgrade PHP on Windows.

 

How to upgrade PHP on windows

Now let’s take a look at how to upgrade the PHP in Windows.

1. First, make sure that Web Platform Installer is present in IIS. For that, open the Internet Information Systems and click on the server name. If Web Platform Installer is not present then click on the “Get New Web Platform Components”.

2. Now click on the “Install this extension” option on the web browser window that is opened. Then accept the license agreement and follow the prompts to install that Web Platform Installer.

3. Now re-open the IIS and click on the Server Name then Double-Click on the Web Platform Installer.

4. At the top-right of the Web Platform Installer, you can find a Search Window where you need to type “PHP”.

5. Then select the PHP version that you wish to install and click “Add” and “Install”. Also, ensure that you select the 64-bit or 32-bit, depending on the server environment.

6. Finally, now you have successfully upgraded the PHP installation. Then open the command prompt and enter the command iisreset to apply the new settings or you can simply reboot the server to apply the changes.

Selecting and Upgrading PHP on a Plesk server is as simple as selecting the version of your choice from a drop-down menu.

 

Upgrade PHP on Windows manually

1. First, open the Control Panel >> click on Programs and Features >> Turn Windows features on or off. Under the Internet Information Services, World Wide Web Services, Application Development Features, make sure that option CGI is checked. This will enable both the CGI and FastCGI services, which are recommended for PHP applications.

2. For Windows, download PHP from the below link.

http://windows.php.net/download/

We are using PHP as FastCGI. So we shall use the 64-bit Non-Thread Safe (NTS) version (i.e., php-7.1.1-nts-Win32-VC14-x64.zip).

3. Extract the file php-7.1.1-nts-Win32-VC14-x64.zip to its own folder.

4. Copy current PHP7 installation from v7.0 and rename the copy to v7.1.

5. Then copy all files from the PHP7 zip folder to the new renamed v7.1 folder.

6. Now edit the php.ini (C:\Program Files\PHP\v7.1\php.ini) to reflect the new version (7.1) under [WebPIChanges]:

error_log=C:\WINDOWS\temp\PHP71x64_errors.log
extension_dir=”C:\Program Files\PHP\v7.1\ext\”
;extension=php_mysql.dll
extension=php_mysqli.dll
[PHP_WINCACHE]
extension=php_wincache.dll

MySQL extension was deprecated on PHP version 5.5 and removed on version 7. If it’s not excluded, you’ll see the following error:

PHP Warning: PHP Startup: Unable to load dynamic library ‘C:\Program Files\PHP\v7.1\ext\php_mysql.dll’ – The specified module could not be found.

in Unknown on line 0

7. Now open the IIS Manager and click on FastCGI Settings.

8. Then double-click on the PHP 7.0 settings and copy all the property values including the Environment Variables (PHP_FCGI_MAX_REQUESTS, PHPRC) and Advanced Settings. We are now going to reuse all the values from the existing installation instead of starting from scratch.

Once done, click the Cancel button.

9. Now from the FastCGI Settings window, click on Add Application… on the Actions pane on the right.

10. Then type in C:\Program Files\PHP\v7.1\php-cgi.exe on the Full Path box.

11. Now enter all the values that you have copied from the Steps 8, except for the PHPRC where you want to update the value to 7.1 (i.e., C:\Program Files\PHP\v7.1).

After completion, click on OK.

12. Then go back to IIS Manager and click on Handler Mappings.

13. Search for PHP_via_FastCGI and double-click on it.

14. Now locate the new php-cgi.exe and change the value on the Executable (optional): accordingly. Click Yes when there is a dialog box asking you to create a FastCGI application for this executable.

Finally, click OK and exit the IIS Manager.

[Need any further assistance with Windows queries? – We are here to help you.]

 

Conclusion

In today’s writeup, we saw how our Support Engineers upgrade PHP on Windows.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF