Install the composer on Windows 2012

0

My operating system has two Apaches running two phps (5 and 7.1 respectively). I'm trying to install the composer for PHP7, but it's giving the following message:

  

The PHP exe file you specified did not run correctly: C: \ PHP7 \ php.exe

     

The php.ini used by your command-line PHP is: C: \ PHP5 \ php.ini

     

A setting in your php.ini could be causing the problem: Either the   'extension_dir' value is incorrect or the dll does not exist.

If I type in localhost: 81 which is port to php7 it works normally bringing the phpinfo, but in the composer it gives error.

IfItrythecommandlineit'sasifopensslisnotenabled,butit's

Givethefollowingmessagewhentryingthecommandbelow:

php-r"copy (' link ', 'composer-setup.php');

  

Warning: copy (): Unable to find the wrapper "https" - did you forget   to enable it when you configured PHP?

    
asked by anonymous 02.05.2018 / 19:05

2 answers

1

Delete the installation of php5, there is a conflict in the php.ini call

    
09.05.2018 / 19:42
1

You do not need to delete php5, otherwise it will not go away so you will not be able to test your Apache with it.

The problem is that probably both versions of PHP are in the% variable of environment variables and / or user variables example:

  

I personally recommend that you review both user variables and system variables , because if you have PHP5 and PHP7 it will even complicate.

So the ideal would be to use only one or the other in the variables, in case I think you want to use PHP7, then remove everything that has php5 from the user variables and system variables (Log off and log in again to make sure it will update everything.)

    
09.05.2018 / 19:52