C
C
chelkaz2017-04-23 00:18:33
Laravel
chelkaz, 2017-04-23 00:18:33

How can this be? Class 'GuzzleHttp\Client' not found after migrating project?

Class 'GuzzleHttp\Client' Worth "guzzlehttp/guzzle": "^6.2",
Installed via composer and works (but not via Redis tasks) I'm suffering from
misunderstanding for the second day. There is a project on another server, everything works fine (email notifications are queued via redis)
There is another server, everything is set up. The radish is worth it.
I make a copy of the project there from scratch, and when I try to send a notification, I get:
Class 'GuzzleHttp\Client' not found
Although it costs. I decided to check to transfer a fully working duplicate from the first server to this one.
And I was surprised that now an exact copy of the working draft does not work on the new server, but writes:
Class 'GuzzleHttp\Client' not found
It turns out that the problem is not in the code and not in the files!?
I check the radish and see that it is being written to:
lrange queues:default 0 -1

1) "{\"displayName\":\"App\\\\Notifications\\\\ResetPassword\",\"job\":\"Illuminate\\\\Queue\\\\[email protected]\",\"maxTries\":null,\"timeout\":null,\"data\":{\"commandName\":\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\",\"command\":\"O:48:\\\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\\\":6:{s:11:\\\"notifiables\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":2:{s:5:\\\"class\\\";s:8:\\\"App\\\\User\\\";s:2:\\\"id\\\";a:1:{i:0;i:10;}}s:12:\\\"notification\\\";O:37:\\\"App\\\\Notifications\\\\ResetPassword\\\":5:{s:5:\\\"token\\\";s:64:\\\"919336a6f1331ab99026e52e28417e8fd9b1480cd7822ff1467d\\\";s:2:\\\"id\\\";s:36:\\\"05888349-0f62-49ee-8d97-f2d0059fcfdb\\\";s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:5:\\\"delay\\\";N;}s:8:\\\"channels\\\";a:1:{i:0;s:4:\\\"mail\\\";}s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:5:\\\"delay\\\";N;}\"},\"id\":\"vxFuA62k7UQr9ZtpPB9V4viXv2vNXWJ2\",\"attempts\":0}"

---------------------
After lrange queues:default 0 -1
(empty list or set)
And an error appears in the logs:
Symfony\Component\Debug\Exception\FatalThrowableError: Class 'GuzzleHttp\Client' not found in /data/wwwroot/vendor/laravel/framework/src/Illuminate/Mail/TransportManager.php:185

How can this be? If the new server has an exact copy that runs on another server. What could be the reason? I thought it was in the code and files, but after uploading an exact working copy and getting an error, I began to think that it was something else ... What then?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2017-04-23
@opium

it’s obvious that you don’t have http gasl
look where you get it from
here either the include didn’t pass or the library doesn’t cost some kind in php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question