Question

I want to implement push notification in a project, a simple chat program.

I am installing Ratchet Library in local wamp with zmq with composer. here is following json which is using from http://socketo.me/docs/push

{
    "autoload": {
        "psr-0": {
            "MyApp": "src"
        }
    },
    "require": {
        "cboden/Ratchet": "0.3.*",
        "react/zmq": "0.2.*"
    }
}

It was giving error

Problem 1
    - Installation request for react/zmq 0.2.0 -> satisfiable by react/zmq[v0.2.
0].
    - react/zmq v0.2.0 requires ext-zmq * -> the requested PHP extension zmq is
missing from your system.

I have search a lot how to install zmq extension. Then i have installed zmq extansion. Checked in phpinfo

zmq

ZMQ extension   enabled
ZMQ extension version   1.1.2
libzmq version  2.2.0

But still when i installing composer from cmd giving me same error.

Était-ce utile?

La solution

When you are using the Command line for things like Composer, you may need to make the same extension changes to the CLI version of the php.ini

By that I mean that when you are using the CLI ( Command Line Interface ) PHP loads a different php.ini it is found in the \wamp\bin\php\phpx.y.z folder and called php.ini.

So add the same extension=???? and any others that you may require to this php.ini file and it should work.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top