Well, I have previously installed PHP 5.3.28 from executable which installed it on my machine, globally with entries in the path variable as:
path ...;C:\php\php53\;...
and another variable as:
PHPRC C:\php\php53
This PHP is configured with Apache 2.2.Running PHP -v from command line results in the version of PHP
After some time I needed to upgrade my versions of PHP (to 5.6) and Apache (to 2.4) and I downloaded them as archived packages and configured them. So now I have two separately configured sets of PHP and Apache. Both of them are working fine, and i also added new PHP 5.6 into my environmental variables but it is not recognizing it.
My environmental variables are:
I also added C:\php\php56\ to path also ahead of red line.But its not working.I require both of these versions of php.exe's.
In the Environment Variables window (as shown below), highlight the Path variable in the System Variable section and click the Edit button. Add or modify the path lines with the paths you want the computer to access. Each different directory is separated with a semicolon, as shown below.
To add a path to the PATH environment variableIn the System dialog box, click Advanced system settings. On the Advanced tab of the System Properties dialog box, click Environment Variables. In the System Variables box of the Environment Variables dialog box, scroll to Path and select it.
An . env file is a plain text file which contains environment variables definitions which are designed so your PHP application will parse them, bypassing the Apache, NGINX and PHP-FPM. The usage of . env files is popular in many PHP frameworks such as Laravel which has built-in support for parsing .
Make sure you have php56.exe present in "c:\php\php56\" i.e. "c:\php\php56\php56.exe". You can rename php.exe to php56.exe to test.
Have you also restarted you cmd prompt? Environment variables (the path) do no update inside of an active cmd prompt unless they are edited only within the command prompt.
You can also try calling c:\php\php56\php.exe with a full path to make certain it is working regardless of paths.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With