How to install Gearman for PHP on OS X

Setup Gearman for PHP with OS X 10.9.2 Mavericks using brew. This requires libgearman and the easiest way to get it is probably to install gearman through brew, of course.

It might also be worth noting that this works for me with the brew build of PHP. It will probably work for the distribution that comes with OS X but I haven’t tested.

sudo pecl install gearman

Next copy the following contents into /usr/local/etc/php/5.4/conf.d/ext-gearman.ini (or wherever your extension config directory is):


Restart apache:

sudo apachectl restart

That’s it. Test to make sure it’s loaded with phpinfo.

Apr 23, 2014 Programming

Support this blog

Buy yourself ANYTHING!

That's right! Shop as you normally would using with my affiliate link and the commissions made go directly into keeping this blog healthy. It's that simple! The hardware and software costs used for this site comes out of my own pocket and it's expensive. Lets keep this site ad free :)

Start shopping on now!

Thank you!
Richard S.