Type php --ini at your command prompt to see which php.ini your PHP CLI uses. Make sure Gearman is enabled in that php.ini.
php --ini
using locate php.iniin my ubuntu laptop show 2 results:
locate php.ini
/etc/php5/apache2/php.ini/etc/php5/cli/php.ini
add both extension=gearman.so into 2 php.ini filethen restart php and gearmand working now.
extension=gearman.so
Install the gearman job server and libgearman
apt-get install gearman-job-server libgearman-dev
Install the pecl extension
apt-get install php-pear php5-devpecl install gearman
Open the correct php.ini file and add extension=gearman.so at the end.