0

I'm a newcomer to Symfony and I have problem installing it . On the Symfony website it says that I have to type:

 php -r "file_put_contents('symfony', file_get_contents('https://symfony.com/installer'));"

it errors :

Warning: file_put_contents(symfony): failed to open stream: Permission denied in Command line code on line 1

Note: I installed composer already and I have WAMP server and I can create a folder in c directory, and also when I typed

php -r "readfile('https://symfony.com/installer');" > symfony

in cmd it says:

Access is denied

I surfed on stackoverflow but I couldn't find any useful answers although some topics are related to my problem!!

Alvin Bunk
  • 7,621
  • 3
  • 29
  • 45
sepehr
  • 165
  • 1
  • 2
  • 10
  • You can find solution here [warning-file-put-contentssymfony-failed-to-open-stream-permission-denied-in](https://stackoverflow.com/questions/40826256/warning-file-put-contentssymfony-failed-to-open-stream-permission-denied-in) – walidtlili Sep 10 '17 at 11:10
  • Possible duplicate of [Warning: file\_put\_contents(symfony): failed to open stream: Permission denied in Command line code on line 1](https://stackoverflow.com/questions/40826256/warning-file-put-contentssymfony-failed-to-open-stream-permission-denied-in) – Michael Hirschler Sep 12 '17 at 07:42

2 Answers2

0

You might be having a permissions issue on Windows.

Try starting the command prompt by right-clicking it and selecting "Run as Administrator". Also run the command from the folder that you created. For example if you created the folder C:\bin, run the command from that folder.

Alvin Bunk
  • 7,621
  • 3
  • 29
  • 45
-1
  1. download it by the URL in your navigator https://symfony.com/installer
  2. put the downloaded symfony.phar in your project's folder
  3. go in the folder with the console and run "php symfony.phar new yourProjectName"
Michael Hirschler
  • 2,345
  • 16
  • 28
Smaïne
  • 1,374
  • 12
  • 19