server taking too much time to start a port - php

I am using Ubuntu 14.04 and I am trying to install Laravel framework. In this purpose I have run this code in terminal:
php artisan serve
After waiting for 4-5 minutes I got this response:
Laravel development server started on http://localhost:8000/
[Tue May 26 13:19:40 2015] 127.0.0.1:44800 [200]: /favicon.ico
[Tue May 26 13:19:40 2015] 127.0.0.1:44801 [200]: /favicon.ico
After waiting for more than 10 minutes I got no more response although terminal is working.
Does it really take that much time? Or what's wrong?

then, what can I do? although port 8000 has been started,
localhost:8000 shows that, Sorry, the page you are looking for could
not be found.
You need to stop the server and run this command which specifies the public directory php -S localhost:8000 -t public/ as the root document root
or
you can also cd into your laravelProject/public then php -S localhost:8000

Related

How can I kill the current php artisan serve session before starting a new one?

I often find myself open up so many ports when running php artisan serve
Laravel development server started: <http://127.0.0.1:8000>
[Thu Dec 2 19:56:23 2021] Failed to listen on 127.0.0.1:8000 (reason: Address already in use)
Laravel development server started: <http://127.0.0.1:8001>
[Thu Dec 2 19:56:23 2021] Failed to listen on 127.0.0.1:8001 (reason: Address already in use)
Laravel development server started: <http://127.0.0.1:8002>
[Thu Dec 2 19:56:23 2021] Failed to listen on 127.0.0.1:8002 (reason: Address already in use)
Laravel development server started: <http://127.0.0.1:8003>
Is there away to kill http://127.0.0.1:8000 before starting a new one ?
so my application will be at http://127.0.0.1:8000...
Any hint for on how to do that ?
I think you can close the terminal, and then the port automatically gets killed.
But if that does not work, you can kill the process manually by running this command :
kill $(lsof -t -i:8000)

Avast deleted my server.php file now I have uninstalled avast pasted server.php file in the root of directory still website doesn't work

Whenever I started php artisan serve it deleted serever.php file. Now I have uninstalled avast antivirus but still it gives this error and does not open the site properly.
PS C:\xampp\htdocs\ecom_proj> php artisan serve
Laravel development server started: http://127.0.0.1:8000
**[Fri Dec 11 12:52:23 2020] PHP 7.4.5 Development Server (http://127.0.0.1:8000) started
[Fri Dec 11 12:52:45 2020] 127.0.0.1:54908 Accepted
[Fri Dec 11 12:52:45 2020] 127.0.0.1:54909 Accepted
[Fri Dec 11 12:52:51 2020] 127.0.0.1:54908 Closing**
First, the example shown only shows communication with a browser. Closing the connection is normal behavior. (Note the port. Your server is running on port 8000).
You should check the antivirus logs what has been removed. It doesn't necessarily have to be just server.php. For example: Eset deleted the file where it found:
//<script src="http://link-to-site-detected-as-abusive">
Have you restored the server.php file in the correct version of Laravel?
Maybe you have a bug in your code.

Laravel Server keep starting and closing

I am new to Laravel. After installing the composer this problem occurs. I change the port number to 1000 but nothing changed. So don't know what to do.
PS C:\xampp\htdocs\WebDev>php artisan view: clear //view clear Compiled views cleared!
PS C:\xampp\htdocs\WebDev>php artisan serve
Starting Laravel development server: http://127.0.0.1:8000
[Mon Oct 12 22:21:43 2020] PHP 7.4.10 Development Server (http://127.0.0.1:8000) started
[Mon Oct 12 22:22:05 2020] 127.0.0.1:50516 Accepted
[Mon Oct 12 22:22:05 2020] 127.0.0.1:50517 Accepted
[Mon Oct 12 22:22:05 2020] 127.0.0.1:50516 Closing
[Mon Oct 12 22:22:05 2020] 127.0.0.1:50517 [200]: GET /favicon.ico
[Mon Oct 12 22:22:05 2020] 127.0.0.1:50517 Closing
laravel custom port serve,
for example, you want on the localhost:1000
php artisan serve --host=localhost --port=1000
sometimes you got an error, already port uses, for that you should kill process
you can kill php artisan of process
kilall php
that command make kill all PHP process
also, you have other preference
find a process which uses the port, and kill it
for find process for which one port uses
sudo fuser -v -n tcp 8000
you can kill process as such
kill -9 <process-id>
and again call command php artisan serve --port=1000
shortly
php artisan serve --host=localhost --port=1000
I had the same issue and I think it's related to the port 8000. Maybe it's already in use or something like this because when I changed the port to 9000 (ie: php artisan server --port=9000) it solved the issue and works just fine now.
Disable smadav auto block, you can find it on the smadav icon, bottom right conner of your screen

php artisan serve slow when loading another page or submit form

I have a project that use laravel 5.6. I always use the php artisan serve for developing my apps. But in this case, when I click submit on page that on my browser, artisan serve loads the page so slow. The command prompt just shows this
$ php artisan serve
Laravel development server started: <http://127.0.0.1:8000>
[Fri May 4 21:10:47 2018] 127.0.0.1:50133 [200]: /css/materialize.min.css
[Fri May 4 21:10:47 2018] 127.0.0.1:50147 [200]: /js/materialize.min.js
[Fri May 4 2
I don't know what happens with this artisan serve. So what should I do apart moving my project app to htdocs?
I'm using windows 10

Laravel 5.1 application setup with existing source code

Am trying to setup laravel application, but it is displaying only laravel default page. not able to run the application.
i have followed below steps.
1)dump the code in xamp\htdocs\sample(application folder name) and updated db details
in command prompt
2) composer update
3)php artisan up
4)php artisan serve
after serve command it is displaying as "Laravel development server started on http://localhost:8000/
[Tue Jan 30 14:58:23 2018] ::1:51377 [200]: /favicon.ico
[Tue Jan 30 14:58:26 2018] ::1:51380 [200]: /favicon.ico
[Tue Jan 30 14:59:51 2018] ::1:51384 [200]: /favicon.ico
in browser http://localhost:8000/ displaying laravel defaule page.
please let me know how to setup the application and if i miss anything in above steps.
thanks in advance.

Categories