How to add multiple php variables to ie path environment variable

Well, I previously installed PHP 5.3.28 from an executable file that installed it on my computer, globally with entries in a path variable, like:

path ...;C:\php\php53\;... 

and another variable:

 PHPRC C:\php\php53 

This PHP is configured with Apache 2.2. Running PHP -v from the command line leads to the PHP version

enter image description here

After some time, I needed to upgrade my versions of PHP (to 5.6) and Apache (to 2.4), and I downloaded them as archive packages and configured them. So now I have two separately configured sets of PHP and Apache. Both of them work fine, and I also added the new PHP 5.6 to my environment variables, but it does not recognize it.

enter image description here

My environment variables:

enter image description here

I also added C: \ php \ php56 \ to the path still ahead of the red line. But it does not work. I need both of these php.exe versions.

+5
source share
1 answer

Make sure php56.exe is present in "c: \ php \ php56 \" ie "c: \ php \ php56 \ php56.exe". You can rename php.exe to php56.exe for testing.

Did you also restart the cmd command? Environment variables (path) do not update inside the active cmd prompt unless they are edited only on the command line.

You can also try c: \ php \ php56 \ php.exe with the full path to make sure that it works regardless of the paths.

+5
source

Source: https://habr.com/ru/post/1239135/


All Articles