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

Respect's avatar

php artisan serve not working

Hello Friends php artisan serve not working it's say started in terminal once i open 127.0.0.1:8000 in browser not loading and terminal say accepting -- closing accepting -- closing accepting -- closing accepting -- closing accepting -- closing etc

i tried another port

 php artisan serve --port=9000

exact same thing it was working since 1 hour a go but i dont know what happend

My OS is UBUNTU 18.04 LTS

thanks

0 likes
5 replies
James_Moore's avatar

Double check your .env for anything that might look a bit strange maybe you accidentally typed something, try also just using the php built in server maybe you'll get a different error that'll will help you out more.

php -S localhost:8000

Also have you looked into using homestead etc it really takes the head ache out of local environment setups.

1 like
Respect's avatar

Thanks For Answer

I got diffrenent error Not Found The requested resource / was not found on this server.

Respect's avatar
Respect
OP
Best Answer
Level 3

Hey Thanks So MR James_Moore

the problem was in in duplication or routes of same start point

Route::get('/', 'FrontendController@welcome')->name('welcome');
Route::get('/', 'NewsletterController@store')->name('newsletter.store')

Thanks Again

Respect's avatar

Thank You Mr DominicT

was duplication in same route entry point

Route::get('/', 'FrontendController@welcome')->name('welcome');
Route::get('/', 'NewsletterController@store')->name('newsletter.store')

Thanks So Much FOr Answer

Please or to participate in this conversation.