PHP wrapper to Gearman https://pecl.php.net/package/gearman

Rasmus Lerdorf 8fb88d5a97 Merge pull request #19 from esabol/patch-1 2 лет назад
examples 287811c5fa Update reverse_client.php example to use doNormal() 9 лет назад
tests deef931a30 Param to skip exception handling setup in addServer/addServers in GeamanWorker class 3 лет назад
.gitignore a1a7b8a3df adding to the .gitignore 9 лет назад
.travis.yml 0037b4694e add PHP 7.1 support for Travis CI 8 лет назад
CREDITS 79df470fb8 Re-ran const_gen.sh to get libgearman v0.6. I had a bogus editor setting 16 лет назад
ChangeLog 69d6b78374 Forgot to update the Changelog file 4 лет назад
LICENSE f225b9eea5 Added a few missing files. Started to add all the arginfo stuff. I think 16 лет назад
README f29da7ec61 Fix misspelling in README 2 лет назад
TODO a256a02bd6 Re-named class/methods to conform to the php coding standards, modified 16 лет назад
config.m4 fc1b4e49b4 setting up separate files for gearman job class 8 лет назад
const_gen.sh 2a12523919 - Fixed build issue with 5.1.x 15 лет назад
gearman.stub.php f40fd1aaaf Merge pull request #15 from BlueTM/fix-typo-and-mixed 2 лет назад
gearman_arginfo.h deef931a30 Param to skip exception handling setup in addServer/addServers in GeamanWorker class 3 лет назад
package.xml 9ef318b8ce 2.1.0 pecl release 4 лет назад
php-gearman.ini b35e797a40 Fixed PECL bug #60877 (no way to set client_id for a GearmanWorker) 12 лет назад
php_gearman.c e57ee3139e Reworked serialization bug fix 4 лет назад
php_gearman.h d322619202 Bring back PHP 7.0, 7.1 and 7.2 support because it was easy 4 лет назад
php_gearman_client.c b913577630 fixed memory leak in GearmanClient::doXXX methods 2 лет назад
php_gearman_client.h 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 лет назад
php_gearman_job.c e57ee3139e Reworked serialization bug fix 4 лет назад
php_gearman_job.h e57ee3139e Reworked serialization bug fix 4 лет назад
php_gearman_task.c 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 лет назад
php_gearman_task.h 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 лет назад
php_gearman_worker.c deef931a30 Param to skip exception handling setup in addServer/addServers in GeamanWorker class 3 лет назад
php_gearman_worker.h e57ee3139e Reworked serialization bug fix 4 лет назад
test_client.php 77134cc5b4 cleaning up (some) of test_client.php code 8 лет назад
test_worker.php 2a12523919 - Fixed build issue with 5.1.x 15 лет назад

README

The Gearman PHP Extension provides a wrapper to libgearman. This
gives the user the ability to write fully featured Gearman clients
and workers in PHP, allowing them to quickly develop distributed
applications.

For more information about Gearman, see: http://www.gearman.org/

Requirements
* For the 0.8.* versions, libgearman v0.14 or greater
* For the 1.0.* versions, libgearman v0.21 or greater
* For the 1.1.* versions, libgearman v1.1.0 or greater
* For the 2.0.* versions, testing is done against libgearman v1.1.8 and PHP 7.0-7.4
* For the 2.1.* versions, testing is done against libgearman v1.1.18 and PHP 7.0-8.0

The Gearman PHP Extension requires the Gearman C server and library package
to be installed. You can download the latest from:

https://github.com/gearman/gearmand/releases

See the README file in that package for installation instructions. Once
it is installed you can compile the Gearman PHP Extension. You'll need
to make sure you have the PHP development packages installed first
(if you have 'phpize' command you’re all set). You'll also probably
want the PHP command line interface installed as well (usually named
php-cli). After extracting the Gearman PHP tarball, just run:

phpize
./configure
make
make install

You then need to make PHP aware of the new extension by adding the
following line to your php.ini:

extension="gearman.so"

You can then test if the module is configured correctly with the
PHP cli:

php --info | grep gearman

To run a simple example

cd examples

1. Start the gearmand server in a separate terminal:

gearmand


2. In another terminal, change to this source directory and run:

php examples/reverse_worker.php


3. In another terminal, change to this source directory and run:

php examples/reverse_client.php


You should see some output from both the reverse client and worker
scripts about the status and then a final result.


Have fun!

http://pecl.php.net/package/gearman