Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 08b76975bb61920ad7086c4d5bb00d91 > files > 6

php-gearman-0.7.0-0.5mdv2010.2.i586.rpm

KNOWN BUGS
    - There is a known bug in the $client->do* functions. Since the do
      interface uses task internally I suggest just using the task interface.
      This is a bug in the libgearman c api with luck there will be a fix soon.

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:


Requirements
    * libgearman v0.8 or greater
http://www.gearman.org/
The Gearman PHP Extension requires the Gearman C server and library package
to be installed. You can download the latest from:

https://launchpad.net/gearmand/+download

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!

-James <contact@jluedke.com>