demisang / php-gearman

Gearman job server workers helper
GNU General Public License v3.0
17 stars 10 forks source link

Class 'GearmanClient' not found #4

Open theromie opened 6 years ago

theromie commented 6 years ago

I am getting in Class 'GearmanClient' not found GearmanQueue.php (line 99). Is i have to install extra thing?

demisang commented 6 years ago

Yes, you must install Gearman PHP-extension: http://gearman.org/getting-started/#gearman_php_extension

theromie commented 6 years ago

1st I install apt-get install gearman-job-server 2nd gearmand -d 3rd gearmand -vvv 4th I directly jump to Gearman PHP Extension and perform till ./configure But after that make command and make install command throws error - make: *** No rule to make target `install'. Stop

theromie commented 6 years ago

I skipped Client and Worker API step. Is that neccesory thing? And I am using php 7.1 and PECL throws the error of not compatible with 7.*

demisang commented 6 years ago

Uninstall current version:

apt-get remove gearman-job-server

And try this:

sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt-get install php-gearman

then check php --info | grep gearman

theromie commented 6 years ago

/etc/php/7.1/cli/conf.d/20-gearman.ini, gearman gearman support => enabled libgearman version => 1.1.17

theromie commented 6 years ago

After that should i do gearmand -d

theromie commented 6 years ago

after running sudo php artisan gearman Workers sets:

  1. general
  2. minimal
  3. maximal

Choise worker set: 2

Active workers: crop_image: 50 bad_worker: 50

Config file saved Supervisor stopped, waiting 5 seconds... Supervisor started

and Bottom code for Laravel - At Any Place I have added inside Controller and when i hit that route it goes to 504 Gateway error