You can change php version of composer without uninstalling it, follow these steps :
- Search for system environment variables in cortana.
- Click on the button "Environment variables".
- Under "System variables" select path and click on edit, you will see one entry like this "C:\wamp\bin\php\php5.6.13".
- Just change this to the folder name of the php located at your wamp/bin/php7.1.9, here php7.1.9 is folder name.
- Replace php5.6.13 with bin7.1.9, it will look like these "C:\wamp\bin\php\php7.1.9", just click ok on all the boxes.
- You are done.
- To verify, first close all the cmd windows, than open cmd and type
php -v, press enter and you should see php7.1.9. - If you don't see change in php version than just restart your pc and run
php -vagain in cmd , it will work.
You can change php version of composer without uninstalling it, follow these steps :
- Search for system environment variables in cortana.
- Click on the button "Environment variables".
- Under "System variables" select path and click on edit, you will see one entry like this "C:\wamp\bin\php\php5.6.13".
- Just change this to the folder name of the php located at your wamp/bin/php7.1.9, here php7.1.9 is folder name.
- Replace php5.6.13 with bin7.1.9, it will look like these "C:\wamp\bin\php\php7.1.9", just click ok on all the boxes.
- You are done.
- To verify, first close all the cmd windows, than open cmd and type
php -v, press enter and you should see php7.1.9. - If you don't see change in php version than just restart your pc and run
php -vagain in cmd , it will work.
If anyone is still having trouble, remember you can run composer with any php version that you have installed e.g. $ php7.3 -f /usr/local/bin/composer update
Use which composer command to help locate the composer executable.
Videos
You can uninstall composer, and while re-installing it will ask you to point at your PHP directory which is going to be C:\wamp64\bin\php (usually) at that point you can choose which PHP version you would want to use. good luck.

This means you have yet another installation of PHP in your system. Check your Programs in Control Panel and remove such installation.
However, you can modify your PATH environment variable as well. Procedure
Just remove the path that points to any PHP installation directory.
Else, otherwise, if you are unsure about changing the PATH variable (which can lead to serious problems if not set well), you can just delete the directory that the PATH variable points to.... (I mean the PHP directory)
The totally better solution is to add the path of your PHP7 bin directory at the beginning of the PATH variable. You should also make available composer in this PHP7 bin directory.
Such as, replace the C:\php in your path with C:\wamp\bin\php7 or whatever the location of the PHP7 path is..
Hi @XR220 ,
I suggest you install php manager in IIS. It can help you manage different versions of php and it is simpler to add new php than configure fastcgi manually. Download it from here.
Please download php from this link and choose the zip:
Please put all php folders in C:\Program Files (x86)\PHP for ease of management. (Web PI also install php in this folder)
- Click php manager to register new php version.
- Choose the php-cgi.exe of php 7.3.31 and OK.
- Click Change php version to check which version of php is using now.
- Then click Check php info and OK, it will output the version of php.
If it doesn't output php version correctly and show error that fastcgi exited unexpectedly, you can use command line to run php-cgi.exe. It will tell you why php run failed. When I tested php 7.3.31, it ran failed because VCRUNTIME140.dll is missing. If you have same issue, please download it from here. Choose the x64 or x86 according to your machine.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Bruce Zhang
Hi there, Our intranet sites webserver is curretly using PHP version 7.4.21 and I'm trying to update it to 8.4.12.
I've installed the new version in the web server and saved it in the same PHP folder where the older version was installed.
After that I opened up IIS manager > webserver > Fast CGI settings and created a new fastcgi application with new php version folder path.
Expanded sites and clicked on one of the intranet site
Selected Handler mapping and updated the .php file with new path
Saved and restarted the webserver but the website gives error 505 with the new version. If I change the fastcgi application back to the older version the site works again.
Can someone please help me or let me know if I'm missing anything or suggest something? Thanks!