‘php.exe’ is not recognized as an internal or external command, operable program or batch file

前端 未结 10 1240
后悔当初
后悔当初 2020-11-29 08:24

‘php.exe’ is not recognized as an internal or external command, operable program or batch file.

Why does that error occur even though

相关标签:
10条回答
  • 2020-11-29 08:41

    it is very easy to do
    You need to also add php.exe
    Adding this path:
    windows key + pause
    click on Advance system settings
    click Environment Variable
    System variables part -> Path -> Edit and the add
    C:\wamp\bin\php\php5.3.8;
    close you cmd prompt if its open
    It's Done!

    0 讨论(0)
  • 2020-11-29 08:42
    A:\xampp\php\php.exe
    

    The PATH environment variable must contain paths only, not file names.

    Make that

    A:\xampp\php
    
    0 讨论(0)
  • 2020-11-29 08:45

    If you have installed WAMP server, then your path can vary. For example, I installed WAMP and the path to my php.exe turned out to be:

    C:\wamp\bin\php\php5.5.12\php.exe
    

    To make it work, I entered the following path in the PATH variable of the System Variables:

    C:\wamp\bin\php\php5.5.12
    

    Once done, I restarted command prompt and everything worked fine.

    So the path can vary depending upon how you installed PHP. If you would like to install WAMP server and have it install other essential packages like PHPMyAdmin, etc. you may do so from: wampserver.com

    0 讨论(0)
  • 2020-11-29 08:49

    This happened to me and I found why.

    Xampp can't run properly depending on your UAC settings.

    Try to do this:

    1. Log in as administrator (running cmd.exe as administrator isn't enough)

    2. Execute cmd.exe or equivalent

    3. type php -version

    0 讨论(0)
提交回复
热议问题