Giga
Giga

Reputation: 98

How to start Symfony built-in server?

I've been using Symfony Built-in server, but now when I use the command: php bin/console server:start it is not starting anymore. It says: couldn't open input file : bin/console. How can I solve this problem ?

Upvotes: 0

Views: 9735

Answers (5)

Jean-Marc
Jean-Marc

Reputation: 919

With symfony 5.x, (probably 4.x, I did not check), enter symfony server:start from your web application folder.

The symfony application can be reached in a browser with the URL returned by the command.

Upvotes: 0

Pierrick Rambaud
Pierrick Rambaud

Reputation: 2434

the error couldn't open input file : bin/console means that it cannot find the bin folder. two possiblities :

  • you're not in the appropriate folder. Go to your application folder before executing any php bin/console ... command.
  • you're using an <2.7 version of symfony and the command you'll need to use is php app/console ...

Upvotes: 0

Arslan Butt
Arslan Butt

Reputation: 795

Symfony version 5.0: symfony server:start

Before: php bin/console server:run

Upvotes: 0

Giga Sesitashvili
Giga Sesitashvili

Reputation: 38

You need to use the following command:

php app/console server:run

Upvotes: 2

Sergio Ivanuzzo
Sergio Ivanuzzo

Reputation: 1922

Just use app/console instead of bin/console.

On the documentation page you can select your current Symfony version. In Symfony 3.0 bin/console is using. In early versions - app/console.

Compare: Symfony 2.7 built-in web server and Symfony 3.0 built-in web server.

Upvotes: 2

Related Questions