0

Guys I have set path of php.exe in environment variables. But still it's the same problem in command prompt : in command prompt

I have even tried with Gitbash or powershell. I genuinely think I have set path correctly and I even tried adding 'php.exe' at last.

environment variables

I can't get any solutions. Please HELP.

B. Desai
  • 16,414
  • 5
  • 26
  • 47
a.nivesh
  • 9
  • 1
  • 5
  • 3
    add the folder path. not the path to the exe file – Allloush Jan 05 '18 at 09:31
  • Have you restarted command prompt? After adding path of php.exe directory in env varaible? Note don't add **php.exe** in system path only add its directory path – B. Desai Jan 05 '18 at 09:37
  • @B.Desai yes, I even restarted laptop and didn't add php.exe either. still same problem encounters. – a.nivesh Jan 05 '18 at 11:23
  • Actually, there is no file 'php.exe' in xampp/php. But there are 'php-cgi.exe', 'phpdbg.exe', 'php-win.exe'. Isn't the file 'php-win.exe' is same as 'php.exe' but only for windows?? – a.nivesh Jan 05 '18 at 11:28

1 Answers1

2

Try the following :

  1. Before setting the path in your environment variables, test the command directly by navigating to the folder from your command prompt then execute the command .

  2. If the command is working, add the path to your environment variables and restart your computer. Open the command prompt as an administrator by right clicking the command prompt.

  3. Ensure you open the command prompt as an administrator.

Hope this help

Friday Ameh
  • 1,664
  • 1
  • 10
  • 15