0

I have some kind of internal API which works with a DB and I'm doing calls to this API via AMQP. And when I do a synchronous (RPC) call and after that trying to redirect then HTTP connection resets. I'm redirecting like this:

header("Location: some_url"); die;

And I've found that the problem is in die() function. So I'm using PHP5.3, Apache2, RabbitMQ as AMQP broker. Also I'm using this extension http://pecl.php.net/package/amqp to work with AMQP. This is very confusing because if I remove die() everything is fine with the connection. But it's impossible to remove it because PHP: Utilizing exit(); or die(); after header("Location: ");

I will really appreciate if somebody can give me clue. Thanks

Community
  • 1
  • 1

1 Answers1

0

Try to call flush() before die().

j0k
  • 22,600
  • 28
  • 79
  • 90
metalfight - user868766
  • 2,722
  • 1
  • 16
  • 20