ZeroMQ, a software library that lets you quickly design and implement a fast message-based application!
So I had this project where I was supposed to install Xibo CMS. Among other requirements, XIBO needs php-zmq extension. The server was running cPanel/WHM.
For PHP-7.1 and PHP-7.2 installing the php extension is pretty straight forward:
1 2 | /usr/bin/ea-php71-pecl install channel://pecl.php.net/zmq-1.1.3 /usr/bin/ea-php72-pecl install channel://pecl.php.net/zmq-1.1.3 |
Well, for PHP-7.3 it doesn’t work like that since the any of the above commands, using php-7.3 will result into a compilation error and the exntesion won’t be installed.
After a little bit of digging and reading, I came up with this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1) Ensure you have git installed and some library development files: yum -y install git zeromq-devel 2) Clone php-zmq repository: git clone https://github.com/zeromq/php-zmq.git 3) Configure php-zmq cd php-zmq /opt/cpanel/ea-php73/root/usr/bin/phpize ./configure --with-php-config=/opt/cpanel/ea-php73/root/usr/bin/php-config make make install 4) Enable ZeroMQ extension for php-7.3: cd /opt/cpanel/ea-php73/root/etc/php.d/ cat > zzzzzzz-pecl.ini << EOF extension="zmq.so" EOF |
And voila, php-zmq for PHP-7.3 is fully functional!
getting below erro after running this cmd “cat > zzzzzzz-pecl.ini <”
root@server [/opt/cpanel/ea-php73/root/etc/php.d]# cat > zzzzzzz-pecl.ini <
[2] 32702
-bash: gt: command not found
[3] 32704
-bash: zzzzzzz-pecl.ini: command not found
-bash: lt: command not found
[2]+ Stopped cat
root@server [/opt/cpanel/ea-php73/root/etc/php.d]#
cat > zzzzzzz-pecl.ini <
Please try now, I’ve updated the post accordingly. There was a typo because of the HTML tags. Now the post should be looking good and you can copy/paste the final step. Thanks!