本文介绍了从 PHP 连接到 RabbitMQ - Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我们的一台服务器上运行了 RabbitMQ,我正在尝试通过 PHP 连接到它.我正在 Windows7 机器上开发,我的第一行代码如下:$cnn = new AMQPConnection();

I have RabbitMQ running on one of our servers and am trying to connect to it via PHP. I am developing on a Windows7 machine and my first line of code reads:$cnn = new AMQPConnection();

它给了我错误:致命错误:在

我知道我需要安装它,但它是什么?我是 PHP 的新手,所以有一点帮助会很好.

I know that it is something that I need to install but what is it ? I am new to PHP so a little help would be nice.

Ps:我可以通过 RabbitMQ 管理 Web 界面连接到 RMQ 服务器.

Ps: I can connect to the RMQ server via the RabbitMQ admin web interface.

谢谢杰克

推荐答案

使用该特定代码可能不走运.该类来自 PECL aqmp 扩展.在安装说明中,它指出:

You may be out of luck using that specific code. That class is from the PECL aqmp extension. Inside the installation instructions, it states:

Windows 用户注意:此扩展目前不支持 Windows,因为 librabbitmq 库支持尚不支持 Windows.

您需要使用另一个库来代替您的消息队列.

You will want to use another library to speak to your message queue instead.

这篇关于从 PHP 连接到 RabbitMQ - Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 04:38
查看更多