title: RabbitMQ - PHP / Python consumer problems
body: <p>I have a python application which pushes messages into a rabbitMQ queue using pika library.</p>
  
  <pre><code>message='hola'
  credentials = pika.PlainCredentials('guest', 'guest')
  connection = pika.BlockingConnection(pika.ConnectionParameters(credentials=credentials, host='localhost'))
  channel = connection.channel()
  channel.queue_declare(queue='myqueue')
  channel.basic_publish(exchange='',routing_key='myqueue',body=message)
  connection.close()
  </code></pre>
  
  <p>That works. </p>
  
  <p>I need to consume these messages in a php application. I tried this as mentioned in a AQMP example at this page - <a href="http://www.php.net/manual/en/class.amqpqueue.php" rel="nofollow">http://www.php.net/manual/en/class.amqpqueue.php</a> (check function reciever) </p>
  
  <pre><code>$cnn = new AMQPConnection((array("host"=&gt;"ec2-xxx-xx-xx-xxx.ap-southeast-1.compute.amazonaws.com","login"=&gt;"guest", "password"=&gt;"guest")));
  if ($cnn-&gt;connect()) {
      echo "Established a connection to the broker";
  }
  else {
      echo "Cannot connect to the broker";
  }
  
      $queue = new AMQPQueue($cnn); 
      $queue-&gt;declare('myqueue'); 
      $queue-&gt;bind('', 'myqueue'); 
  
  $msg=$queue-&gt;get(AMQP_AUTOACK);
  echo $msg-&gt;getBody();
  </code></pre>
  
  <p>Throws this exception - </p>
  
  <pre><code>Fatal error: Uncaught exception 'Exception' with message 'Error parsing parameters.' in /home/webroot/amqptest.php:12 Stack trace: #0 /home/webroot/amqptest.php(12): AMQPQueue-&gt;declare('myqueue') #1 {main} thrown in /home/webroot/amqptest.php on line 12
  </code></pre>