1

I'm working on a laravel app. I made the simple installation of a new laravel app, and in the previous days it was running great.

But now I'm not able to access my project in browser after running php artisan serve. The browser just says page not found and the buffering of that page is like infinite.

I tried to run the server in a different port with:

php artisan serve --port=9000

and then accessed it in http://127.0.0.1:9000/

It run well once, but then it stopped again.

double-beep
  • 5,031
  • 17
  • 33
  • 41
Tiago Ramos
  • 21
  • 2
  • 6

3 Answers3

1

You could try out the following:

  • php -S localhost:8000 -t public To run withe inbuilt PHP server
  • Make a fresh installation of a laravel project and copy your files into it.
double-beep
  • 5,031
  • 17
  • 33
  • 41
cross19xx
  • 3,170
  • 1
  • 25
  • 40
  • the code I tried is really just the commands in cmder command line: > php artisan serve > php artisan serve --port=9000 and there were no error message, just the behaviour I described above. And thank you that command worked. I'm just concerned about this: that command runs the same thing as **php artisan serve** ? because I think artisan runs some more proccesses than just php, or my wrong? Thank you – Tiago Ramos Feb 14 '19 at 10:47
  • Running `php artisan serve` simply runs `php -S 127.0.0.1:8000 -t public`. But the major advantage of this is that it can attach Laravel's debugger during it's execution. So, to be on the safer side, just use `php artisan serve` – cross19xx Feb 14 '19 at 10:49
1

It didn't work for me but I used composer:

php artisan serve --port=9000 

Then it hanged. I press CTRL+C and I got it working without any errors

double-beep
  • 5,031
  • 17
  • 33
  • 41
0

Try this, I got solved by these;

1) Change the default url to like this - localhost/<your-project-name>/public/ instead of default one 127.0.0.1:8000

or

2) use this php -S localhost:8000 -t public or php -S 127.0.0.1:8000 -t public

Mostafiz
  • 31
  • 7