简体   繁体   中英

'php' is not recognized as an internal or external command in terminal

I installed php5 on monday and it was working with no problems and it's been working up until today when I tried to do a "php artisan migrate" command in the terminal and it said it wasn't recognized, I have the php5 folder saved in "C:\\" and hasn't been moved since installation. 在此处输入图片说明

在此处输入图片说明

Probably You should append directory path of your php.exe to windows PATH environment variable. But be careful by changing this variables. Some information can be found here: http://www.itechtalk.com/thread3595.html or just use Google for more examples.

Kindly try php -v from the command prompt. If you get something like PHP 5.6.10 as output, then your php exists in your path.

In case your PATH is not set, you can use the SET command to set your PHP for that particular instance. Or you can go to My Computer --> Properties --> Advanced --> Environment Variables and append your php directory to the PATH variable.

Thanks!

I reinstalled wamp and in doing so moved my old wamp folder to the desktop forgetting that I had used the wamp php file as my environment path. Ty for all your suggestions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM