V
V
voltd gand2019-05-31 16:43:34
PHP
voltd gand, 2019-05-31 16:43:34

Why does it give a composer error if I'm not in the PHP folder?

If I am in PHP root folder

C:\Users\вова\Desktop\Server\php-getting-started\php
, then the composer command works properly, but as I move to another file and enter, it displays an error:
"php" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stalker_RED, 2019-05-31
@vladimir_volohov

add the path to the php binary in path , or specify the full path.

C
catrinblaidd, 2019-05-31
@catrinblaidd

Comp doesn't know what 'php' is. Looks for an executable file with the same name in the global PATH variable or in the current folder. So when you are in the php root folder, it finds it, but not in other folders. Instead of "php" you need to write "C:\Users\vova\Desktop\Server\php-getting-started\php" everywhere. Or add this path to the PATH system variable, how to do it depends on your operating system, it's easy to find instructions in the search.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question