php-zmq is a native PHP extension that provides bindings to the ZeroMQ messaging library. It exposes ZeroMQ's sockets, contexts, and messaging patterns directly to PHP code, allowing PHP applications to participate in the same asynchronous, brokerless messaging topology that ZeroMQ provides to C, C++, Python, and other languages. ZeroMQ is not a message broker. It is a library that extends the standard socket interfaces with patterns traditionally associated with message-oriented middleware (publish/subscribe, request/reply, push/pull), and their combinations. The php-zmq extension surfaces those patterns to PHP without requiring a separate daemon. Requirements ------------ The extension links against libzmq, the core ZeroMQ library. That library must be present on the system at both build time and run time. On AMĀ·OS the package that provides it is: zeromq If libzmq is not installed, the build will fail during ./configure with a message about a missing zmq.h or an unresolved -lzmq. Install the zeromq package and rebuild. Enabling the extension ---------------------- The package installs a configuration stub at: /etc/php.d/zmq.ini.new On install, the doinst.sh script renames this to zmq.ini. To enable the extension, go to /etc/php.d/zmq.ini and uncomment the line: ; extension=zmq.so so that it reads: extension=zmq.so After enabling, restart any running PHP processes. For CLI use, no restart is needed. The configuration is read on each invocation. Verifying the install --------------------- From a shell: php -m | grep zmq If the extension is loaded, this prints "zmq". To confirm the version that is linked against libzmq: php -r 'echo ZMQ::LIBZMQ_VER, "\n";' This reports the version of the underlying ZeroMQ library. If libzmq is missing at run time, PHP will fail to start with an error about being unable to load the dynamic library, and the fix is to install the zeromq package. Build note ---------- This is a source build of the extension. The PECL tarball zmq-1.1.3.tgz is expected in this directory. It is not downloaded automatically.