1

I use a cloud service to handle RabbitMQ. The purpose is to send and receive messages from smart objects that use MQTT. All works but... A formPage.php on submit triggers a shellexec command that executes initRpc.php. In initRpc.php this infinite loop is used to receive messages but block every other functions even if declared before, like an header('location ...');

while (count($channel->callbacks)) 
     {
       try {
           $channel->wait(null, false, $timeout);
           }
       catch (AMQPTimeoutException $e) {
           return;                
           }
      }

The result is that the formPage.php on submit remain on the same page, loading for ever. How to prevent this issue?

However I can still navigate the website clicking manually on links and make also other request..so the receiver it's running in background without problems.

merovingio
  • 31
  • 2

0 Answers0