Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

symfony' is not recognized as an internal or external command

Tags:

symfony

I was using official symfony documentation on how to install symfony and create symfony project.
After running the command : symfony new my_project I got this error:

symfony' is not recognized as an internal or external command

What could be the reason of not being able to run this command?

like image 592
Marooweb Avatar asked Mar 27 '15 14:03

Marooweb


1 Answers

I just came across this problem and it was driving me crazy until i found the solution. First let me tell you the steps I took:

  • My machine is running Windows 7
  • went to this site for instructions: http://www.symfony.com/download
  • opened up Command Prompt and entered c:\> php -r "readfile('http://symfony.com/installer');" > symfony
  • once it was ready, I ran this command: php symfony new my_project
  • All failed.
  • I kept trying different things even changing PATHs in windows environments but that did nothing
  • SOLUTION: I rebooted my machine, then opened up Command Prompt by right clicking on its icon and selecting "Run As Administrator", followed the steps again, and it finally worked.

In my case, this was the issue. I believe the .phar file was created with errors due to it. Hope this helps.

like image 60
CodeGodie Avatar answered Nov 09 '22 02:11

CodeGodie