0

How can i start server?

My steps:

1- i installed composer

2- i created my project

C:\wamp\www> composer create-project symfony/website-skeleton symfony-kurs

3- then i tried to start the server

C:\wamp\www>symfony-kurs>php bin/console server:run
C:\wamp\www>symfony-kurs>php bin/console server:start

4- i realized there is a problem. Command "server:run" is not defined.

server:run

all server options

5-Then i tried install web server bundle with this code:

composer require symfony/web-server-bundle --dev

6- then i ve error. it is my output:

Could not find package symfony/web-server-bundle in a version matching 5.3.*

InvalidArgumentException

7-Then i tired with symfony server:run and my output:

C:\wamp64\www\symfony-kurs>symfony server:run
'symfony' is not recognized as an internal or external command,
operable program or batch file.

8- Then i wanted to create path for symfony and my output:

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

Warning: readfile(https://symfony.com/installer): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
 in Command line code on line 1
yusuf__
  • 7
  • 4
  • 2
    Indeed, `web-server-bundle` doesn't exist for 5, it has been superceded by [Symfony server](https://symfony.com/doc/current/setup/symfony_server.html), and has to be installed in the system, not as a composer dependency. – msg Jun 30 '21 at 17:17
  • 1
    You need the symfony CLI installed. Follow the [directions](https://symfony.com/download) for your operating system. There is actually a setup.exe for Windows. Off topic but you will save yourself a bunch of trouble if you shift to a non Windows environment. Consider using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install-win10). – Cerad Jun 30 '21 at 17:27
  • you are right. that s my fault. i was doing it based on Symfony 4. – yusuf__ Jun 30 '21 at 21:37
  • if you are working on windows , i suggest you this solution https://stackoverflow.com/questions/71164888/how-to-install-symfony-cli-on-windows-10 – Ibrahim Zeroual Jun 16 '22 at 10:19

0 Answers0