0

There is only a handful of threads on installing gearman on Windows, especially the gearman PHP extension. I have not found a solution yet. If anyone found a solution to get gearman PHP extension working on Windows, please comment on this thread.

I came across this thread on pecl install gearman. When attempting to install Gearman PHP extension through cygwin using pecl, the installation failed with the following error.

$ pecl search gearman
Retrieving data...0%
Matched packages, channel pecl.php.net:
=======================================
Package Stable/(Latest) Local
gearman 1.1.2 (stable)        PHP wrapper to libgearman

$ pecl install gearman
pecl/gearman requires PHP (version >= 5.1.0, version <= 6.0.0, excluded versions: 6.0.0), installed version is 7.1.12 
No valid packages found 
install failed

I checked PHP version and it is 5.6.3. Where is that installed version 7.1.12 coming from?

$ php -v
PHP 5.6.31 (cli) (built: Jul  5 2017 22:24:51)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

Related thread: How can i install gearman php extension on Windows OS?

Dorjee Dhondup
  • 549
  • 6
  • 15
  • 1. Cygwin is bad at being a *nix environment, you should use a linux VM. 2. Windows is bad as a PHP environment and, unless your ultimate deployment/production environment is going to be Windows, you should use a linux VM. 3. PECL gearman is abandonware, and gearman itself is awful, use an AMQP server [eg: RabbitMQ] and a PHP AMQP lib [eg: php-amqplib]. 4. PHP 5.6 End-of-Life is coming, use PHP7. – Sammitch Dec 15 '17 at 00:22
  • Thanks, @Sammitch. We develop on Windows, but deploy on Linux. – Dorjee Dhondup Dec 15 '17 at 22:51
  • Don't do that. Use something like Vagrant and replicate your production environment to a local VM so that: 1. You have a sane linux env. 2. Your dev and prod environments match. 3. Using something like [PuPHPet](https://puphpet.com/) allows you to spin up new, *clean* dev environments easily. You still use "Desktop OS of choice" to run your IDE, but your code/tests/etc run in an environment that matches production. – Sammitch Dec 15 '17 at 23:29

0 Answers0