I\'m having problem starting my laravel installation. Whenever I type in the terminal \'php artisan serve\' it responses me an error:
Fai
for me php -S localhost:8080 from the terminal in vs code will sometimes crash, but still be running in the background.
-9 to force kill did it for me thanks @hemss
I did
php -S localhost:8080
[Wed Dec 12 13:48:03 2018] Failed to listen on localhost:8080(reason: Address already in use)
then I..
sudo netstat -plnt
find the process running on port 8080
tcp 2 0 127.0.0.1:8080 0.0.0.0:* LISTEN 10312/php
then force kill it..
kill -9 10312
I get
[1] + 10312 killed php -S localhost:8080
then restart...
php -S localhost:8080
Use killall -9 php
and if you want to close other services use killall -9 node
or killall -9 mysql
Fixing Error: Failed to listen on localhost:8000
(reason: Address already in use)
ps -ef | grep php
501 **9347** 393 0 1:29PM ttys000 0:00.21 php artisan serve
501 9351 **9347** 0 1:29PM ttys000 0:02.01 /usr/local/php5-5.6.14-20151002-085853/bin/php -S localhost:8000 .../laravel/server.php
501 9781 393 0 1:56PM ttys000 0:00.00 grep php
kill -9 9347
8000 is the default port. Use instead of :
php artisan serve --port=8005
If you have all your configurations ok in the .env file then you should:
Use the answer from mayorsanmayor in this post to kill all php processes. Then php artisan config:clear
Finally, php artisan serve
Good luck!