I installed Laravel through composer using PHP 7.3.25 through xampp v3.2.4. I first noticed the problem: cli stopped working, during
php artisan serve
I scoured SO and the internet for possible fixes. Going through these commands fixed this problem for me (or so I thought):
composer update --no-scripts
php artisan clear-compiled
composer dump-autoload
But every time I turn on the PC, I get the same error and have to follow these steps to make it work. Antivirus did not have anything to do with it (I checked). Is there any way to fix this without having to completely reinstall everything?
Its ist important to understant few points related to following queue:restart command.
The queue workers' age confirmed that they restarting in response to that.
php artisan queue:restart
Ref: https://laravel.com/docs/8.x/queues#queue-workers-and-deployment
Related
Yes, I have detected that php artisan is stuck if I have another php artisan running in backgroup. For example I run: php artisan horizon & and then trying to php artisan migrate or just php artisan to bring whole list of options didnt work. Just freeze until I stop php artisan horizon. And then I can work with php artisan migrate. Any idea of what's happening? I'm using docker image php:8-apache. I wonder it could be related to php. I will tell you if I found out what is.
The problem was PHPStorm listening to debug, because I have XDebug to connect to my computer always.
xdebug.client_host=mycomputer
xdebug.mode=debug
xdebug.start_with_request=1
xdebug.discover_client_host=0
xdebug.client_port=9001
I disabled PHPStorm listening for PHP Debug Connections and problem solved.
I ran these commands: php artisan route:clear and php artisan cache:clear. Then I got this error on whatever I want to do: running artisan command, running composer command, rendering any view that worked just fine. Can not do anything at all.
I searched for the problem and seems that this has happened because of changing the php version from 7.4 to 7.3. Yes, I have done this about 10 days ago, now I am not able to resolve it and make it work again. I use Nginx and tried anything suggested on the web, but can not solve the problem. I had apache and could not solve it, I removed apache completely and installed nginx. Now any other project works fine with nginx, but only this project which I ran php artisan route:clear and php artisan cache:clear commands, has problem and displays this error on every action I want to do: Erroneous data format for unserializing 'Symfony\Component\Routing\CompiledRoute'.
How can I solve this problem?
I got this same error when I was experimenting with Laravel Envoy. I think I pulled the 7.0 version of Envoy onto of my Laravel 5.8 version app. The way to solve it for me was to clear out the bootstrap/cache directory of the app with the command rm -fr bootstrap/cache/* from the root Laravel directory. Once I did that I was able to use my application normally and all the artisan commands began working.
I have a problem with my project laravel 5.7. I have developed it locally and all is well but once sent to my server online I have this error: view [auth.login] not found.
Ran into the same problem. I noticed three things;
A message while booting homestead about virtualbox guest-tools being out of sync between host and guest. There could be a problem with paths. I fixed that issue with the help of this here
The Laravel view [auth.login] not found on server page displayed the path of the host machine and not of the vagrant-guest.
bootstrap/cache/config.php also displayed paths from the host and not the guest.
Renaming/deleting (or artisan cache:clear) the config.php only gave errors (Laravel Error “Unable to load the ”app“ configuration file”).
I fixed the issue by correcting the paths in config.php manually to the correct path in vagrant.
Run following commands on your server.
it might solve your problem.
php artisan config:clear
php artisan cache:clear
php artisan view:clear
php artisan route:cache
php artisan optimize
or
composer dump-autoload -o
if you are in develop mode you can run:
php artisan config:clear
or if you are in product mode you can run:
php artisan config:cache
notice: when you use second, config clear and cache again and you force to repeat command for other changes.
My IDE is phpstorm and running on WAMP Server. While coding, it does not show the expected response, always returns the previously requested response (In postman). Each time, I need to close 'php artisan serve' with CTRL+C and then run again to get the expected response.
I tried changing IDE, changing port but it does not work. Of course, I tired to save manually ( CTRL+S) but the problem persists.
I also tried the following commands:
php artisan cache:clear
php artisan config:clear
php artisan route:clear
composer dump
But the problem still persists.
The issue might be the composer command. Please, have a look on my setup in the Makefile:
run:
php artisan config:cache
php artisan config:clear
php artisan cache:clear
composer.phar dump-autoload -o
php artisan serve
And it's ready to go with a Laravel's "clean build".
Can you try with a diferent request tool, like doing a GET on your browser?
Or just create a new endpoint to test that. This way you make sure that changes are being saved.
I recommend you make tests to see if:
the problem is on your postman (a cache maybe?);
the problem is that your code isn't being saved;
the problem is on your local server (a persistent cache?);
My tip is: Try to eliminate the possible causes and you should achieve an answer.
Let´s try to make sure about above items and if them are ok, we check possible another ones.
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.