symfony' is not recognized as an internal or external command
It is confusing how simple instruction given. Here is a simple how-to (assuming you have php command on your windows, Linux is similar or go here http://symfony.com/download):
Installation on Windows:
c:\> php -r "file_put_contents('symfony', file_get_contents('https://symfony.com/installer'));"
then
php symfony new my_new_project 2.8
(my_new_project is your project name and 2.8 is the version of symfony) - Done!
Note:
So you understand php calls symfony parameter/file to create a symfony project name my_new_project version 2.8 but pay attention that the symfony file is downloaded earlier. So you must have the symfony file in the current directory or use path to point to different location if elsewhere.
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.