Hello,
i've upgraded my ubuntu to 16.04 and to php7.
My amqp php client doesn't want to start.
Before i was using ubuntu 14 with php 5.6
I've some problems with certificates in wordpress on the same machine, can be the same issue? here the debug output
< [hex]:
0000 41 4D 51 50 00 00 09 01 AMQP....
waiting for 10,10
waiting for a new frame
> 10,10: Connection.start
Start from server, version: 0.9, properties: capabilities=(publisher_confirms=1, exchange_exchange_bindings=1, basic.nack=1, consumer_cancel_notify=1, connection.blocked=1, consumer_priorities=1, authentication_failure_close=1, per_consumer_qos=1, direct_reply_to=1), cluster_name=rabbit@rabbitmq, copyright=Copyright (C) 2007-2016 Pivotal Software, Inc., information=Licensed under the MPL. See http://www.rabbitmq.com/, platform=Erlang/OTP, product=RabbitMQ, version=3.6.5, mechanisms: AMQPLAIN, PLAIN, locales: en_US
< 10,11:: Connection.start_ok
< [hex]:
0000 01 00 00 00 00 01 50 00 0A 00 0B 00 00 00 F3 07 ......P. ......â–’.
0010 70 72 6F 64 75 63 74 53 00 00 00 07 41 4D 51 50 productS ....AMQP
0020 4C 69 62 08 70 6C 61 74 66 6F 72 6D 53 00 00 00 Lib.plat formS...
0030 03 50 48 50 07 76 65 72 73 69 6F 6E 53 00 00 00 .PHP.ver sionS...
0040 03 32 2E 36 0B 69 6E 66 6F 72 6D 61 74 69 6F 6E .2.6.inf ormation
0050 53 00 00 00 00 09 63 6F 70 79 72 69 67 68 74 53 S.....co pyrightS
0060 00 00 00 00 0C 63 61 70 61 62 69 6C 69 74 69 65 .....cap abilitie
0070 73 46 00 00 00 8C 1C 61 75 74 68 65 6E 74 69 63 sF...â–’.a uthentic
0080 61 74 69 6F 6E 5F 66 61 69 6C 75 72 65 5F 63 6C ation_fa ilure_cl
0090 6F 73 65 74 01 12 70 75 62 6C 69 73 68 65 72 5F oset..pu blisher_
00A0 63 6F 6E 66 69 72 6D 73 74 01 16 63 6F 6E 73 75 confirms t..consu
00B0 6D 65 72 5F 63 61 6E 63 65 6C 5F 6E 6F 74 69 66 mer_canc el_notif
00C0 79 74 01 1A 65 78 63 68 61 6E 67 65 5F 65 78 63 yt..exch ange_exc
00D0 68 61 6E 67 65 5F 62 69 6E 64 69 6E 67 73 74 01 hange_bi ndingst.
00E0 0A 62 61 73 69 63 2E 6E 61 63 6B 74 01 12 63 6F .basic.n ackt..co
00F0 6E 6E 65 63 74 69 6F 6E 2E 62 6C 6F 63 6B 65 64 nnection .blocked
0100 74 01 08 41 4D 51 50 4C 41 49 4E 00 00 00 42 05 t..AMQPL AIN...B.
0110 4C 4F 47 49 4E 53 00 00 00 09 62 65 65 73 73 6D LOGINS.. ..beessm
0120 61 72 74 08 50 41 53 53 57 4F 52 44 53 00 00 00 art.PASS WORDS...
0130 20 69 37 4B 75 6A 61 45 68 71 68 31 59 57 5F 47 i7KujaE hqh1YW_G
0140 6E 67 38 39 41 72 72 2D 67 54 62 72 36 38 70 51 ng89Arr- gTbr68pQ
0150 62 05 65 6E 5F 55 53 CE b.en_USâ–’
< 10,11:: Connection.start_ok
waiting for 10,20, 10,30
waiting for a new frame
> 10,30: Connection.tune
< 10,31:: Connection.tune_ok
< [hex]:
0000 01 00 00 00 00 00 0C 00 0A 00 1F FF FF 00 02 00 ........ ...â–’â–’...
0010 00 00 00 CE ...â–’
< 10,31:: Connection.tune_ok
< 10,40:: Connection.open
< [hex]:
0000 01 00 00 00 00 00 10 00 0A 00 28 09 62 65 65 73 ........ ..(.bees
0010 73 6D 61 72 74 00 00 CE smart..â–’
< 10,40:: Connection.open
waiting for 10,41
waiting for a new frame
> 10,41: Connection.open_ok
Open OK! known_hosts:
using channel_id: 1
< 20,10:: Channel.open
< [hex]:
0000 01 00 01 00 00 00 05 00 14 00 0A 00 CE ........ ....â–’
< 20,10:: Channel.open
waiting for 20,11
waiting for a new frame
> 20,11: Channel.open_ok
Channel open
< 60,20:: Basic.consume
< [hex]:
0000 01 00 01 00 00 00 25 00 3C 00 14 00 00 0D 77 65 ......%. <.....we
0010 62 47 61 74 65 5F 71 75 65 75 65 0B 77 65 62 43 bGate_qu eue.webC
0020 6F 6E 73 75 6D 65 72 00 00 00 00 00 CE onsumer. ....â–’
< 60,20:: Basic.consume
waiting for 60,21
waiting for a new frame
> 60,21: Basic.consume_ok
waiting for any method
waiting for a new frame
> 60,60: Basic.deliver
waiting for a new frame
PHP Fatal error: Uncaught Error: Call to undefined function PhpAmqpLib\Wire\bcadd() in /var/www/PhpAmqpLib/Wire/AMQPReader.php:302
Stack trace:
#0 /var/www/PhpAmqpLib/Channel/AbstractChannel.php(284): PhpAmqpLib\Wire\AMQPReader->read_longlong()
#1 /var/www/PhpAmqpLib/Channel/AbstractChannel.php(267): PhpAmqpLib\Channel\AbstractChannel->createMessage(Object(PhpAmqpLib\Wire\AMQPReader), Object(PhpAmqpLib\Wire\AMQPReader))
#2 /var/www/PhpAmqpLib/Channel/AbstractChannel.php(490): PhpAmqpLib\Channel\AbstractChannel->wait_content()
#3 /var/www/PhpAmqpLib/Channel/AbstractChannel.php(338): PhpAmqpLib\Channel\AbstractChannel->maybe_wait_for_content('60,60')
#4 /var/www/server.php(131): PhpAmqpLib\Channel\AbstractChannel->wait()
#5 {main}
thrown in /var/www/PhpAmqpLib/Wire/AMQPReader.php on line 302
< 20,40:: Channel.close
< [hex]:
0000 01 00 01 00 00 00 0B 00 14 00 28 00 00 00 00 00 ........ ..(.....
0010 00 00 CE ..â–’
< 20,40:: Channel.close
waiting for 20,41
waiting for a new frame
PHP Fatal error: Uncaught PhpAmqpLib\Exception\AMQPRuntimeException: Expecting AMQP method, received frame type 3 (FRAME-BODY) in /var/www/PhpAmqpLib/Channel/AbstractChannel.php:426
Stack trace:
#0 /var/www/PhpAmqpLib/Channel/AbstractChannel.php(396): PhpAmqpLib\Channel\AbstractChannel->validate_frame(3, 1, 'AMQP method')
#1 /var/www/PhpAmqpLib/Channel/AbstractChannel.php(330): PhpAmqpLib\Channel\AbstractChannel->validate_method_frame(3)
#2 /var/www/PhpAmqpLib/Channel/AMQPChannel.php(170): PhpAmqpLib\Channel\AbstractChannel->wait(Array)
#3 /var/www/server.php(45): PhpAmqpLib\Channel\AMQPChannel->close()
#4 [internal function]: shutdown(Object(PhpAmqpLib\Channel\AMQPChannel), Object(PhpAmqpLib\Connection\AMQPStreamConnection))
#5 {main}
thrown in /var/www/PhpAmqpLib/Channel/AbstractChannel.php on line 426
here a bit of my code:
require_once './vendor/autoload.php';
include('config.php');
use PhpAmqpLib\Connection\AMQPStreamConnection;
$exchange = 'exchange';
$queue = 'queue';
$consumer_tag = 'webConsumer';
$conn = new AMQPStreamConnection(HOST, PORT, USER, PASS, VHOST);
$ch = $conn->channel();
function process_message($msg)
{
$msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);
if ($msg->body === 'quit') {
$msg->delivery_info['channel']->basic_cancel($msg->delivery_info['consumer_tag']);
}
}
$ch->basic_consume($queue, $consumer_tag, false, false, false, false, 'process_message');
It looks like the BC Math PHP extension is not enabled in the system.
That's the first error message. The error with frame type happens when the cannel tries to close after the first exception.
README file states bcmath extension is required, should we close this ticket?
Most helpful comment
README file states bcmath extension is required, should we close this ticket?