-
Notifications
You must be signed in to change notification settings - Fork 45
/
README
72 lines (44 loc) · 2.18 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Note: This repo is no longer under active development beyond v2.0.6 (for PHP 7.3.x). If you're looking for a pecl-gearman repo with future updates (for PHP 7.4.x and beyond), you can find it at the official pecl-gearman repo here: https://github.com/php/pecl-networking-gearman
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