2

I face this error only when "php artisan serve" command is not running. If this command is running then there is no such a error, but as i closed command prompt this error occurs. i have also changed port but no vain. Kindly help me.I would like to mention here that I'm using Window 10 OS. Thanks in advance.

Programmer
  • 178
  • 1
  • 2
  • 15

3 Answers3

3

If you don't have a HTTP server (like WAMP or similar installed), you'll need to keep the Command Prompt / Terminal window running at all times. Closing the window or stopping the php artisan server command will terminate the server that's running the website.

If you want a persistent server, you should look into server software like WAMP or XAMPP.

Note that this is expected behavior for the php artisan serve command.

Niraj Shah
  • 15,087
  • 3
  • 41
  • 60
  • I'm using XAMPP but still error occuring. Kindly help me – Programmer Feb 20 '19 at 13:46
  • If you're already using XAMPP then no need to use `php artisan serve`. Make sure XAMPP is configured correctly to point to your Laravel project and, including port number. Add details on your XAMPP configuration to your question so we can help further. – Niraj Shah Feb 20 '19 at 15:08
  • @ Niraj Shah how to Add details on myXAMPP configuration ? kidnly guide me Thanks – Programmer Feb 21 '19 at 04:42
  • I don't use XAMPP. Please consult the documentation or visit the XAMPP website for help. – Niraj Shah Feb 21 '19 at 10:59
1

because with this kind of server (like: LARAGON), running 'php artisan serve' is necessary, so if you close the terminal, 'php artisan serve' will automaticaly stop running, then the server will stop too, then you can't reach anymore your localhost.

Amel krd
  • 74
  • 3
0

If you want a persistent server, you should look into server software like WAMP or XAMPP.

Note that this is expected behavior for the

php artisan serve command