Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I stop a symfony process which is listening on http://127.0.0.1:8000

Tags:

linux

php

symfony

I am trying to run a basic Symfony installation which I generated using this command :

$ symfony new basic

When I run the following commands :

$ cd basic
$ php bin/console server:run

I get this error message :

[ERROR] A process is already listening on http://127.0.0.1:8000.

I suspect that a previous symfony process is causing this but I have no clue how to stop it.

I'm on a Ubuntu 14.04 machine. Any help would be appreciated.

like image 275
Achraf JEDAY Avatar asked Nov 17 '16 12:11

Achraf JEDAY


3 Answers

You can stop the server using:

php bin/console server:stop

or you can force server to start even if previous one is running:

php bin/console server:start --force

For more info check the doc

like image 177
Tomasz Madeyski Avatar answered Oct 15 '22 08:10

Tomasz Madeyski


Better to use killall -9 php to kill all php scripts that are running. Otherwise you wil start a new one while the previous one is still running.

Is probably caused by a infinite loop.

Note: This will "kill" all running php scripts

like image 17
Puya Sarmidani Avatar answered Oct 15 '22 09:10

Puya Sarmidani


This works on Symfony 5. Open the integrated terminal inside VSCode.

First stop the running local server:

symfony local:server:stop

Then start a new one:

symfony server:start

Open your browser and navigate to: 127.0.0.1:8000

If the command symfony is not recognized, then you need to install the Symfony as instructed here: Install Symfony

like image 12
Ali Avatar answered Oct 15 '22 08:10

Ali