[rabbitmq-discuss] Working PHP impl. to send and receive?
Gavin Butler
gavinbutler at hushmail.com
Mon Nov 15 20:28:56 GMT 2010
Here's the output from the test script that is bundled with the
project. I haven't really made an effort to debug this though.
Just in case there is any uncertainty, this is from the pure PHP
project hosted here: http://code.google.com/p/php-amqplib/ ; the other
pure PHP project suggested by Alvaro (https://github.com/tnc/php-
amqplib) works perfectly.
We're going to use Alvaro's suggestion, but if you or anyone else wish
to debug further with our environment setup, I will gladly help with
that.
Thanks,
-gavin
amqp_test.php output:
Creating connection
< [hex]:
0000 41 4D 51 50 01 01 09 01 AMQP....
waiting for 10,10
waiting for a new frame
PHP Warning: feof() expects parameter 1 to be resource, object given
in /root/php-amqplib-read-only/amqp_wire.inc on line 302
PHP Warning: fread() expects parameter 1 to be resource, object given
in /root/php-amqplib-read-only/amqp_wire.inc on line 303
Caught exception: Error reading data. Recevived 0 instead of expected
1 bytes
Trace:
#0 /root/php-amqplib-read-only/amqp_wire.inc(348): AMQPReader-
>rawread(1)
#1 /root/php-amqplib-read-only/amqp.inc(494): AMQPReader->read_octet()
#2 /root/php-amqplib-read-only/amqp.inc(514): AMQPConnection-
>wait_frame()
#3 /root/php-amqplib-read-only/amqp.inc(166): AMQPConnection-
>wait_channel(0)
#4 /root/php-amqplib-read-only/amqp.inc(251): AbstractChannel-
>next_frame()
#5 /root/php-amqplib-read-only/amqp.inc(350): AbstractChannel-
>wait(Array)
#6 /root/php-amqplib-read-only/amqp_test.php(21): AMQPConnection-
>__construct('test-rabbbitmq', 5672, 'guest', 'guest')
#7 {main}< [hex]:
0000 01 00 00 00 00 00 0B 00 0A 00 3C 00 00 00 00
00 ........ ..<.....
0010 00 00 CE ..Î
< 10,60: Connection.close
waiting for 10,61
waiting for a new frame
PHP Warning: feof() expects parameter 1 to be resource, object given
in /root/php-amqplib-read-only/amqp_wire.inc on line 302
PHP Warning: fread() expects parameter 1 to be resource, object given
in /root/php-amqplib-read-only/amqp_wire.inc on line 303
PHP Fatal error: Exception thrown without a stack frame in Unknown on
line 0
On Nov 15, 7:24 am, "Schlomer, Loren" <Loren.Schlo... at echostar.com>
wrote:
> I have good luck sending JSON with the pure PHP AMQP lib. What errors are you seeing?
>
> ________________________________________
> From: rabbitmq-discuss-boun... at lists.rabbitmq.com [rabbitmq-discuss-boun... at lists.rabbitmq.com] On Behalf Of Gavin Butler [gavinbut... at hushmail.com]
> Sent: Sunday, November 14, 2010 2:07 PM
> To: rabbitmq-disc... at lists.rabbitmq.com
> Subject: [rabbitmq-discuss] Working PHP impl. to send and receive?
>
> Hello list,
>
> Has anyone had success using a AMQP or Stomp PHP client to both
> send and receive messages from RabbitMQ? If so, please could you
> post the version of the client/library, and various dependency
> versions?
>
> Our RabbitMQ version is 2.1.0, and we have had varying degrees of
> success with AMQP and Stomp (if anyone would like more details, I
> will gladly provide them):
>
> RabbitMQ-C library extensions (http://code.google.com/p/php-amqp/,http://code.google.com/p/php-rabbit/):both sent messages with no
> problems, though get or consume failed to retrieve any message
> content.
>
> Pure PHP AMQP (http://code.google.com/p/php-amqplib/):an
> assortment of errors sending.
>
> Fusesource Stomp client
> (http://stomp.fusesource.org/documentation/php/index.html):send
> and subscribe works, though ack does not (invalid body
> terminator...which seems ok: "\x00").
>
> Stomp PHP Extension (http://pecl.php.net/package/stomp):both send
> and receive do not work (no errors, but works fine with ActiveMQ,
> incidentally).
>
> Zend Stomp: sends and receives, though doesn't appear to coexist
> with queues of the same name (and vhost) used by other
> producers/consumers.
>
> Thanks,
>
> -gavin
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss
mailing list