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.

3 Answers 3

2

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.
Sign up to request clarification or add additional context in comments.

2 Comments

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
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
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

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.