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

Rasmus Lerdorf 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 years ago
examples 287811c5fa Update reverse_client.php example to use doNormal() 9 years ago
tests 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 years ago
.gitignore a1a7b8a3df adding to the .gitignore 9 years ago
.travis.yml 0037b4694e add PHP 7.1 support for Travis CI 8 years ago
CREDITS 79df470fb8 Re-ran const_gen.sh to get libgearman v0.6. I had a bogus editor setting 16 years ago
ChangeLog 1f1293c2fc updating changelog and bumping version 5 years ago
LICENSE f225b9eea5 Added a few missing files. Started to add all the arginfo stuff. I think 16 years ago
README d322619202 Bring back PHP 7.0, 7.1 and 7.2 support because it was easy 4 years ago
TODO a256a02bd6 Re-named class/methods to conform to the php coding standards, modified 16 years ago
config.m4 fc1b4e49b4 setting up separate files for gearman job class 8 years ago
const_gen.sh 2a12523919 - Fixed build issue with 5.1.x 15 years ago
gearman.stub.php 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 years ago
gearman_arginfo.h 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 years ago
package.xml a74c6dbb12 Release of pecl/gearman-1.1.2 11 years ago
php-gearman.ini b35e797a40 Fixed PECL bug #60877 (no way to set client_id for a GearmanWorker) 12 years ago
php_gearman.c 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 years ago
php_gearman.h d322619202 Bring back PHP 7.0, 7.1 and 7.2 support because it was easy 4 years ago
php_gearman_client.c 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 years ago
php_gearman_client.h 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 years ago
php_gearman_job.c 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 years ago
php_gearman_job.h 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 years ago
php_gearman_task.c 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 years ago
php_gearman_task.h 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 years ago
php_gearman_worker.c 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 years ago
php_gearman_worker.h 9dc5082e63 Fix SegFault on serialization of objects A slight refactor of PR #2 - thanks @SwenVanZanten 4 years ago
test_client.php 77134cc5b4 cleaning up (some) of test_client.php code 8 years ago
test_worker.php 2a12523919 - Fixed build issue with 5.1.x 15 years ago

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 modlue is configure correctly with the
PHP cli:

php --info | grep gearman

To run a simple example

cd examples

1. Start the gearmand server in a seperate 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