Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Call to undefined method AMQPChannel::is_open()#344

vol4ikman started this conversation inGeneral
Discussion options

Code:
$connection = new PhpAmqpLib\Connection\AMQPSSLConnection( $host, $port, $user, $password, $vhost = '/', $ssl_opts); $channel = $connection->channel(); $channel->queue_declare('reply-queue', false, true, false, false); echo " [*] Waiting for messages..."; $callback = function ($reply_msg) { echo ' [x] Received ', $reply_msg->body, "\n"; }; $channel->basic_consume('reply-queue', '', false, true, false, false, $callback); while ($channel->is_open()) { $channel->wait(); } $channel->close(); $connection->close();

Error:

Fatal error: Uncaught Error: Call to undefined method PhpAmqpLib\Channel\AMQPChannel::is_open()

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

Accodring to this tutorial:

https://github.com/rabbitmq/rabbitmq-tutorials/blob/main/php/receive.php

What am I doing wrong?

You must be logged in to vote
1 reply
@michaelklishin
Comment options

#is_open isrelatively new, perhaps you run with an outdated version of the client or these tutorials need a dependency version bump.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
2 participants
@vol4ikman@michaelklishin
Converted from issue

This discussion was converted from issue #343 on November 29, 2022 16:52.


[8]ページ先頭

©2009-2025 Movatter.jp