PHP wrapper to libgearman
Clone or download
wcgallego Merge pull request #63 from chrisgoffinet/failcallback-segfault
Fix segfault when calling set fail callback, don't call zval_dtor twice
Latest commit 96d54e2 Aug 31, 2018
Permalink
Failed to load latest commit information.
examples Update reverse_client.php example to use doNormal() Apr 26, 2016
tests Param to skip exception handling setup in addServer/addServers in Gea… Jun 26, 2018
.gitignore adding to the .gitignore Dec 9, 2015
.travis.yml add PHP 7.1 support for Travis CI Dec 24, 2016
CREDITS Re-ran const_gen.sh to get libgearman v0.6. I had a bogus editor setting May 20, 2009
ChangeLog fixing required # of params for add server(s) function for client Jul 11, 2018
LICENSE Added a few missing files. Started to add all the arginfo stuff. I think May 18, 2009
README noting >2.0 should be built against PHP >7.0 Mar 25, 2017
TODO Re-named class/methods to conform to the php coding standards, modified May 19, 2009
config.m4 setting up separate files for gearman job class Nov 6, 2016
const_gen.sh - Fixed build issue with 5.1.x Oct 1, 2009
package.xml Release of pecl/gearman-1.1.2 Aug 29, 2013
php-gearman.ini Fixed PECL bug #60877 (no way to set client_id for a GearmanWorker) Aug 6, 2012
php_gearman.c fixing required # of params for add server(s) function for client Jul 11, 2018
php_gearman.h fixing required # of params for add server(s) function for client Jul 11, 2018
php_gearman_client.c Fix segfault when calling set fail callback, don't call zval_dtor twice Aug 15, 2018
php_gearman_client.h Param to skip exception handling setup in addServer/addServers in Gea… Jun 26, 2018
php_gearman_job.c Finishing up GearmanJob migration Nov 12, 2016
php_gearman_job.h Fix build on OS X Nov 14, 2016
php_gearman_task.c forgot to add constructor/destructor to migration for GearmanTask Nov 6, 2016
php_gearman_task.h Fix build on OS X Nov 14, 2016
php_gearman_worker.c GearmanWorker/addFunction(), Segmentation fault fix #49 May 5, 2017
php_gearman_worker.h Fix build on OS X Nov 14, 2016
test_client.php cleaning up (some) of test_client.php code Nov 5, 2016
test_worker.php - Fixed build issue with 5.1.x Oct 1, 2009

README

Build Status: https://travis-ci.org/wcgallego/pecl-gearman

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 or
    * greater and PHP 7.0 or greater

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