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.