Saturday, March 9, 2019

Install zeroMQ in PHP

ZeroMQ is a high-performance asynchronous messaging library, aimed at use in distributed or concurrent applications. It provides a message queue, but unlike message-oriented middleware, a ZeroMQ system can run without a dedicated message broker.
Wikipedia  ZeroMQ
 
Steps to install zeroMQ in PHP 5.3, PHP 7.1, and 7.2 on Windows
Most likely you want your PHP version, x64, and Thread Safe
but you may have a x32 version of PHP
$ php -i | grep Architecture  
Architecture => x64
  • for PHP 5.3
download 5.3 Thread Safe (TS) x86
extract and copy the dlls

copy libzmq.dll into
C:\wamp\bin\php\php5.3.4
there is no libsodium.dll in PHP 5.3

copy php_zmq.dll into
C:\wamp\bin\php\php5.3.4\ext

add the extension to your php.ini,
usually with the other Dynamic Extensions
extension=php_zmq.dll
  • for PHP 7.1
download 7.1 Thread Safe (TS) x64
extract and copy the dlls

copy libzmq.dll and libsodium.dll into
C:\laragon\bin\php\php-7.1.20-Win32-VC14-x64
there is an extra dll libsodium.dll for PHP 7.1

copy php_zmq.dll into
C:\laragon\bin\php\php-7.1.20-Win32-VC14-x64\ext

add the extension to your php.ini, usually with the other Dynamic Extensions
extension=php_zmq.dll
  • for PHP 7.2
download 7.2 Thread Safe (TS) x64
extract and copy the dlls

copy libzmq.dll into
C:\laragon\bin\php\php-7.2.11-Win32-VC15-x64
there is no libsodium.dll after PHP 7.1

copy php_zmq.dll into
C:\laragon\bin\php\php-7.2.11-Win32-VC15-x64\ext

add the extension to your php.ini, usually with the other Dynamic Extensions
extension=zmq
  • verify by viewing php info
$ php -i | grep zmq  
zmq  
libzmq version => 4.1.3

-End of Document-
Thanks for reading

No comments:

Post a Comment