2
votes

I have install ZMQ 4.2.2 and additionally installed php5-zmq version 1.1.3

PHP version is 5.6, and OS version is Ubuntu 14.04

Added extension to my

/etc/php/5.6/fpm/php.ini and /etc/php/5.6/cli/php.ini extension=zmq.so  

and when trying to run it, it says

PHP Warning: PHP Startup: zmq: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0
PHP Fatal error: Class 'ZMQContext' not found in /home/server/vendor/react/zmq/src/React/ZMQ/Context.php on line 15

I don't know what I'm doing wrong.

1

1 Answers

1
votes

Ok. If someone will stuck in the same as i'm do next trick.

sudo pecl uninstall zmq-beta
sudo apt-get remove php5-dev
sudo apt-get install php5.6-dev
sudo pecl config-set php_bin /usr/bin/php5.6

it will say that

WARNING: php_bin /usr/bin/php5 appears to have a suffix 5.6, but config variable php_suffix does not match

sudo pear config-set php_suffix 5.6
pecl install zmq-beta

That will do the rest.