Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel failed to listen on 127.0.0.1:8000 (reason ?)

enter image description here

So I just created a new project using the command:

laravel new blog

Then I started by changing the directory and do the command

php artisan serve

And this is what happened, more details:

  1. I'm using Laravel 8.0.1
  2. I haven't run any command except the one I listed above
  3. I'm using Windows
  4. I even updated the PHP to 7.4.10

I'm not sure why this is happening, but I'm encountering an issue when using the command:

php -S localhost:8000 -t public
like image 306
Mario Gunawan Avatar asked Sep 10 '25 15:09

Mario Gunawan


2 Answers

I had this problem too, and I solved it in this way:

set: php.ini

variables_order = "GPCS"
like image 104
禹认真 Avatar answered Sep 12 '25 23:09

禹认真


I came across the same issue. This was how how I solved mine:

  1. Goto the main PHP part, I mean the installed PHP from official website.
  2. Look out for a folder named php.ini-development
  3. Duplicate this file.
  4. Then rename the copy to php.ini
  5. Go back to your laravel project folder and rerun php artisan serve

PS: If there is any additional steps you took, you can as well comment them below: XOXO

like image 44
Fritzdultimate Avatar answered Sep 12 '25 22:09

Fritzdultimate



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!