Skip to content

Latest commit

 

History

History

php

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

jomiel client demo written in Php

Notable differences to other examples

  • Output defaults to JSON

php-zmq

php-zmq in PECL is outdated and has issues with php7/8. See:

To workaround this, choose one:

Option #1: Install as a distro package

apk add php7-pecl-zmq    # alpine
apt-get install php-zmq  # debian (remains untested)

php8-pecl-zmq isn't available for Alpine v3.13, but can be found in edge/testing:

apk add php8-pecl-zmq \
  --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/

Option #2: Install from the source

git clone https://github.com/zeromq/php-zmq
cd php-zmq
./configure
make && sudo -c "make install"

Option #3: Install using phpbrew

If you are using phpbrew, you can install the extension with:

phpbrew ext install github:zeromq/php-zmq master

Once php-zmq is installed

  • Confirm that php is reporting the extension
    • Make sure you add extension=zmq to the php.ini file
    • Modify extension_dir if needed
php -m | grep zmq  # php hould report the "zmq" extension
../bin/bootstrap -p ../proto/ -l php -d src/build/gen/
composer install
./bin/demo [args...]