PHP environment variable of xampp is not added to the path

0

I am installing Xampp using the windows command console in an unattended manner. When the installation completes, xampp is installed well except that the environment variable PHP is not added to PATH in the system variables. I'm using windows 7 I want to know if there is a way to add it without having to resort to getting into system configuration, but only using the console. Try with SET PATH=%PATH%;C:\xampp\php but when I close and reopen the console it does not recognize the php command.

    
asked by Kinafune 06.10.2018 в 18:36
source

1 answer

2

You must have administrator privileges, but you could do it with SETX

SETX /M PATH "%PATH%;C:\xampp\php"

The / M parameter is used to add it to system variables. HKLM.

You must restart the console.

  

NOTE This command has a limitation of 1024 characters. It should be used with care in updating variables, as it could   there is a loss of information that compromises the system.

Full documentation at Microsoft Docs

    
answered by 06.10.2018 / 18:48
source