Steps to upgrade PHP on Windows








Are you have issues upgrading Windows PHP? This guide will show you how.


Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform Windows related tasks.

In this context, we shall look into the step to upgrade of PHP on Windows.

How to upgrade PHP on windows?

Follow the steps below to upgrade PHP on Windows;

i. Start by ensuring 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".

ii. Next, 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.

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

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

v. 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.

vi. 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.

How to Upgrade PHP on Windows manually?

1. Start by opening 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 Support in performing Windows Software Installation? – We are available to help you today.]



Conclusion

This article will guide you on how best to perform upgrade of PHP on Windows.


For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com