When running php artisan serve I get the error message:
$ php artisan serve
Starting Laravel development server: http://127.0.0.1:8000
sh: line 0: exec: : not found
Starting Laravel development server: http://127.0.0.1:8001
sh: line 0: exec: : not found
It will repeat trying to start on other ports but without success.
My installation worked fine a couple of days ago and I did not do any manual updates. What does the error message mean?
I also tested to setup a new Laravel project with laravel new test and I can properly launch this. So I assume that all my tools are still correctly installed.
I solved it by myself. I had some wrong variable in my .env file which messed up my php path. I deleted it and now everything runs fine:
PHP_BINARY="/opt/plesk/php/7.4/bin/php"
I used this to debug the site on my shared hosting server. Thanks everyone in the discussions for the good hints.
Related
I used Laravel in Visual Studio code, and when I opened localhost:http://127.0.0.1:8000/ bypassing command php artisan serve, I got an error.
So I used another command php -S localhost:8888 -t public, I used this 8888 localhost. But I can't understand why localhost:http://127.0.0.1:8000 is not working.
This is an image of a browser:
you need to go at your laravel project path and run cmd after that run this command.
Another solution is here
php - Unknown: Failed opening required on line 0. laravel 5.6
I have a fresh installed laravel app and when i run php artisan serve it shows me the server information but when i go to that server it gives a cant be reach error. I am not running Vagrant just MAMP but it used to work before. I did tried to install Vagrant in the past and it didn't work that is why i came back to MAMP only. I read something about generating a key with php artisan key:generate which didn't work. Any help is appreciated.
This is the command I am using and the result
$ php artisan serve
Laravel development server started: <http://127.0.0.1:8000>
try to uninstall the antivirus if you have one ,in my case i uninstall avast ,reboot OS and it works for me .
I am using windows 10 and wamp server and I am fresh installing laravel and all i get is this error message and is it necessary to do php artisan serve everytime i open laravel ? as long as i close cmd prompt localhost:8000 refused to connect .
Php artisan serve error
I think you are running a Laravel project blog by command php artisan serve and you are browsing your application by localhost:8000 or 127.0.0.1:8000
Your screenshot saying that when you are trying to visit a url which is not defined in your routes/web.php then, you are getting invalid request (Unexpected EOF) error in your cmd.
And of course! in this case when you close cmd then your Laravel app will not run.
So now, if you don't want to run your Laravel app by the following command each time, then you can use Laragon in windows environment.
Either you have to run php aritsan serve or set up a virtual host in your OS. Here is how to set up a virtual host in Ubuntu 16.04: How To Set Up Apache Virtual Hosts on Ubuntu 16.04
This is case, you can keep your cmd open. And open another cmd, redirect to file path where you are working and it should work fine.
I'm trying to develop a Laravel app locally and I'm running php artisan serve. It works until I visit localhost:8000 and then the server stops. I've tried changing the port using sudo php artisan server --port=80 but that doesn't fix it.
I haven't written a line of code yet. If it helps I'm running PHP 5.4 on OS X Mavericks.
i think your experiencing segmentation fault(core dumped),
try running this commands
composer dump-autoload
php artisan clear-compiled
composer clear-cache
Please check if you have Avast Antivirus. This antivirus detects server.php as a threat (silently) and blocks it.
As a result, browser works good for the first request and then keeps waiting. Noting comes up on subsequent requests. Solution is to add an exception in antivirus. This problem is specific to Laravel.
If you are using Avast Antivirus, this will delete the server.php file assuming as a threat. You have to create an exception for this. Goto Avast Anitvirus -> Menu -> Settings -> General -> Exceptions. Add exception server.php file path here (add server.php file if it doesn't exist) and run the "php artisan serve" command.
I've looked around SO and couldn't figure out what could be wrong with me running the php artisan serve command and getting the cli stopped working error.
I'm running WAMP and executing the command within my laravel projects folder (wamp/www/project) and get the error.
When I hit debug after Windows fails to find a solution, it shows a message saying "An unhandled win32 exception occured in php.exe [7236]"
Anybody know how to fix this?