Skip to content

Module Api Conflicts on php 5.6 (Ampps) for PECL Package v 1.1.3 #181

@mooror

Description

@mooror

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions