-
Notifications
You must be signed in to change notification settings - Fork 121
Closed
Description
Hello everyone, I'm trying to setup the php zmq package through pecl and am having some issues. I read through and followed these instructions for installing zeroMQ and the pecl package. Everything seemed to work fine when I installed it but when I went to actually use the module in my code I recieved these errors:
PHP Warning: PHP Startup: zmq: Unable to initialize module
Module compiled with module API=20151012
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0
Warning: PHP Startup: zmq: Unable to initialize module
Module compiled with module API=20151012
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0
PHP Fatal error: Class 'ZMQContext' not found in /usr/local/ampps/www/zmq/rep.php on line 2
PHP Stack trace:
PHP 1. {main}() /usr/local/ampps/www/zmq/rep.php:0
Fatal error: Class 'ZMQContext' not found in /usr/local/ampps/www/zmq/rep.php on line 2
Call Stack:
0.0002 229688 1. {main}() /usr/local/ampps/www/zmq/rep.php:0
Heres the code I'm trying to run:
<?php
$context = new ZMQContext();
$server =$context->getSocket(ZMQ::SOCKET_REP);
$server->bind("tcp://*:5454");
while(true) {
$message = $server->recv();
echo "Sending $message World", PHP_EOL;
$server->send($message . " World");
}
I believe this is due to the module being built with a newer version of the Module Api (perhaps php 7's?). If this is indeed the case then I would ask if it could be recompiled using the 20131226 module api version as I believe the package says its compatible with 5.3 or newer.
Thanks in advance,
Mooror
Metadata
Metadata
Assignees
Labels
No labels