@sisilchandana what error it shows?
php artisan serve not working
I am new to laravel. I installed properly laravel last week and it was work properly. Unfortunately today it is not working. When I issue the php artisan serve command it is not working. Pl help me.
Does not appear any error. cursor goes next line.
@sisilchandana Can you try this?
php -S localhost:8000 -t public/
any body families with this error? On internet most of the guys faced this error. Their solutions not work for me? I am used xampp and windows 10 64 bit.
I read some articles on internet and use the following two methods
php artisan serve --host=127.0.0.1 --port=8080 is a one solution but not work for me
php -S localhost:8000 -t public/ - this gives "public/" does not exists'
Help me.
I used this command. But this gives "public/ does not exists"
I suggest two solutions-
Way One:
- Remove vendor folder and run the
composer installagain to download. - Then try to run
php artisan serve.
Way Two:
- Since you are running on xampp (I suppose your application is inside the htdocs folder in xampp), you just run xampp and try to access via browser with
http://localhost/your-project-directory.
Thank you, I was having a similar issue and adding /public/ before the URL I wanted to access worked for me. Like this:
Just curious, If you have xampp how come you aren't using Apache.
And if it was working what changes did you make. Did you recently update or upgrade laravel or the framework.
hi dear,
first sure command in right directory ----->c:/wamp/www/yourproject>php artisan serve
If the problem is not solved then
step 1:right click on wamp icon open apache list and select httpd-vhost.conf step 2:disable localhost area ...-- -- ServerName localhost --ServerAlias localhost --DocumentRoot "${INSTALL_DIR}/www" -- -- Options +Indexes +Includes +FollowSymLinks +MultiViews --AllowOverride All --Require local --< /Directory> --< /VirtualHost>
:))))))
You can try without php artisan serve? Like:
localhost/your_project_folder/public
Why php artisan serve does not work When i enter it goes to next line nothing is happen.
Please help me a soon as possible
Why apache does not get me permission to access resource
Same problem here.

Yes,
php -S localhost:8000 -t public/
works, but the problem remains, that php artisan server does still not work and i found the solution which at least in my specific case solved the problem.
Generally, if php artisan serve does not work / gets stuck at startup / does not expose a "Server running on.." message, this mean something is wrong with your database connection. I looked into my .env file and for some reason the wrong DB Host IP was active. After i corrected it back to 127.0.0.1 everything was fine.
How did i found out? My local xamp mysql was up and running, still no success. I do have some laravel api endpoints which do raw select statements on my DB. These endpoints complained about not being able to connect to the database so i shoot the query manually in MySQL Workbench and i got my result. So something had to be wrong with my laravel app trying to connect with my database and as written above it was the wrong DB Host IP.
Please or to participate in this conversation.