Categories
Fixing Stuff Laravel Samuel

Updating Composer To Use New Version Of PHP

While installing a new Laravl project on my local machine I ran into the need to update the PHP version. I’m on a Windows 7 machine so there are two places that I needed to update the path variable. To do this follow these steps:

1.) Hit start and type “environment variable”. Click “edit environment variables for your account”. This will bring up a window that looks like this:

2.) Select Path and Click Edit in top section (see screenshot)

3.) In the text input field find the snippet that lists the path to PHP it will look like this:

C:\Users\computer-name:\wamp64\bin\php\php7.0.10;

4.) Update the path to the new version of PHP you would like to use, then click ok. Note: you can find the exact file path on your machine by opening up the wamp folder and navigating to bin\php

5.) In the system variables section scroll down till you find path and click edit (see screenshot)

6.) Edit the path variable exactly the same way that we did in step 4

Notes:

– Once you complete these steps to test if you are now using the newer version of php you can click start > type cmd > then type: php -v. If you do not see the new version of PHP restart your computer and test again.