|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59761 can't use the default queue
Submitted: 2011-05-10 23:45 UTC Modified: 2011-10-26 02:08 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: hlopetz at gmail dot com Assigned:
Status: Wont fix Package: amqp (PECL)
PHP Version: 5.2.17 OS: 2.6.18-194.26.1.el5 x86_64 Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-05-10 23:45 UTC] hlopetz at gmail dot com
it's unable to publish a message into the default exchange.

// if i use
$ex = new AMQPExchange($cnn);
// or
$ex->bind($QUEUE_NAME, $QUEUE_NAME);

i get "Server channel error: 403, message: ACCESS_REFUSED - 
operation not permitted on the default exchange"

// if i publish a message
$ex->publish('hello world!', $QUEUE_NAME);

i get "Could not publish to exchange. Exchange name not 

how could i deal with that issue?

Reproduce code:

    $cnn = new AMQPConnection();

    $QUEUE_NAME = 'hello';

    // Create a new queue
    $q = new AMQPQueue($cnn, AMQP_DURABLE);

    // Declare a new exchange
    $ex = new AMQPExchange($cnn);

    // Bind it on the exchange to routing.key
    //$ex->bind($QUEUE_NAME, $QUEUE_NAME);

    // Publish a message to the exchange with a routing key
    $ex->publish('hello world!', $QUEUE_NAME);

    // Read from the queue

} catch (Exception $e)
    echo $e->getMessage(), PHP_EOL;
    echo $e->getTraceAsString(), PHP_EOL;

Expected result:
everything should be fine, afaik )

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-26 02:08 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

It is my understanding that you cannot use blank exchange or queue names. If this is incorrect, please send me some documentation I can use that explains what the limitations are on names.

 [2011-10-26 02:08 UTC]
-Status: Open +Status: Wont fix
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 27 16:03:42 2021 UTC