Reputation: 289
I have a laravel project but when I use the command "php artisan serve" and type the url: http://127.0.0.1:8000/ , its just keep on loading without output nor error appear.
Upvotes: 6
Views: 28784
Reputation: 120
In my case, MySQL was running fine. unless it wasn't. It was showing that it was running okay, but it wasn't. Cause when restarting the Xampp MySQL server. It stated that MySQL couldn't start due to a blocked port or... I then renamed Xampp/mysql/data to Xampp/mysql/data_old created a new folder named data there and copied everything from Xampp/mysql/backup to Xampp/mysql/data. then restarted the Xampp MySQL server,
my laravel project also finished loading and served the application. so the problem was with mysql server not starting properly.
Upvotes: 0
Reputation: 48
In my case I uninstalled Xampp and reinstalled it(I'm assuming you are using Xampp too).It worked for me.
Upvotes: 0
Reputation: 61
Try disabling your anti-virus or check your firewall. I disabled my Avast anti-virus and it's working fine for me now.
Upvotes: 4
Reputation: 11
I experienced this problem also when I first launched out into Laravel. Your port 8000 is most likely occupied by another service or program. Simply go to your terminal where your project is open, and enter the following command
php artisan serve --port=1000
Then, return to your browser and enter the address, replacing 8000 with 1000, as in
127.0.0.1:1000
This worked for me.
Upvotes: 1
Reputation: 893
Run commands
php artisan config:clear
php artisan config:cache
Even after completing these steps, if Laravel is still showing error, check your_project/storage/logs/laravel.log
.
Upvotes: 2
Reputation: 71
The port 8000 might be used by other in your computer. Try to change port by running in your project in cmd:
php artisan serve --port=1000
then type http://127.0.0.1:1000/ on your browser.
Upvotes: 2
Reputation: 1067
I solved this by running this command instead of PHP artisan serve.
php -S 127.0.0.1:8000 -t public/
Then try to load again 127.0.0.1:8000 in your browser.
Upvotes: 12
Reputation: 706
There are several issues may be possible for that.
Check above points this will sure give you positive result.
Upvotes: 0
Reputation: 1050
It sometimes happen because of too many redirection and also sometime because of middleware . so see your whole flow for that page.
Also see your cdn
which included in your page because it take too many time if you have too many cdn and your connection is slow. And also try to clear all cache.
Upvotes: 1
Reputation: 567
Try these three commands for clearing cache config:
php artisan config:cache // clear config cache
php artisan config:clear // clear config cache
php artisan cache:clear // clear cache
php artisan optimize // To reoptimize the class loader
php artisan route:cache // clear route cache
php artisan view:clear // clear view cache
Upvotes: 1