简体   繁体   English

使用zmq和composer安装棘轮库

[英]Installing Ratchet Library with zmq with composer

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. 我正在使用zmq与作曲家在本地wamp中安装Ratchet Library。 here is following json which is using from http://socketo.me/docs/push 这里是关于使用http://socketo.me/docs/push的 json

{
    "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. 我已经搜索了很多如何安装zmq扩展。 Then i have installed zmq extansion. 然后我安装了zmq扩展。 Checked in phpinfo 签入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. 但仍然当我从cmd安装composer给我同样的错误。

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 当您将命令行用于Composer之类的东西时,您可能需要对php.ini的CLI版本进行相同的扩展更改

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.yz folder and called php.ini. 我的意思是,当你使用CLI(命令行界面)时,PHP加载一个不同的php.ini,它可以在\\wamp\\bin\\php\\phpx.yz文件夹中找到并调用php.ini。

So add the same extension=???? 所以添加相同的extension=???? and any others that you may require to this php.ini file and it should work. 和你可能需要这个php.ini文件的任何其他人,它应该工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM