Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

RFDev's avatar
Level 1

Artisan server is misbehaving

Hi, I have a laravel application. I'm testing it in localhost using php artisan serve command. The problem is that whenever I make a request, the server resets and increments the port by 1, making the request fail. Example:

$ php artisan serve
Starting Laravel development server: localhost:8000
Starting Laravel development server: localhost:8001    <- After first request

If I force it on port 8000 when I make the request the server just stops, without returning any error, warning or anything.

$ php artisan serve --port=8000
Starting Laravel development server: localhost:8000
$ <- Got back to command line after request

Has anyone any idea of what is going on? If you need to see code just ask and I'll provide

p.s. artisan is actually writing localhost's ip on console, but laracast won't allow me to post it on my first day

0 likes
3 replies
sr57's avatar

Port 8000 is not available (previous artisan serve?)

You should receive an warning. What is you platform? (warning emit on Linux)

RFDev's avatar
Level 1

@sr57 I checked that port 8000 was free and no other artisan instances are running. By the way I'm on MacOs Monterey

Please or to participate in this conversation.