title: php-amqplib libarary working on command prompt but not on browser
body: <p>I have the same code which work when I run with command prompt. But it throws below error when I try running it with browser.</p>
  <p>I have used php-amqplib. My code simple make connection to RabbitMQ Queue and send a message into queue. The credentials are correct as I am able to run the same file in command prompt.</p>
  <blockquote>
  <p>Notice:  iconv_strlen(): Detected an illegal character in input string
  in
  /var/www/html/php-amqplib/vendor/symfony/polyfill-mbstring/Mbstring.php
  on line 338</p>
  <p>Notice:  iconv_strlen(): Detected an illegal character in input string
  in
  /var/www/html/php-amqplib/vendor/symfony/polyfill-mbstring/Mbstring.php
  on line 338</p>
  <p>Notice:  iconv_strlen(): Detected an illegal character in input string
  in
  /var/www/html/php-amqplib/vendor/symfony/polyfill-mbstring/Mbstring.php
  on line 338</p>
  <p>Fatal error:  Uncaught PhpAmqpLib\Exception\AMQPRuntimeException:
  Error reading data. Received  instead of expected 7 bytes in
  /var/www/html/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php:242 Stack
  trace:</p>
  <h1>0 /var/www/html/php-amqplib/PhpAmqpLib/Wire/AMQPReader.php(149): PhpAmqpLib\Wire\IO\StreamIO-&gt;read(7)</h1>
  <h1>1 /var/www/html/php-amqplib/PhpAmqpLib/Wire/AMQPReader.php(106): PhpAmqpLib\Wire\AMQPReader-&gt;rawread(7)</h1>
  <h1>2 /var/www/html/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(508):</h1>
  <p>PhpAmqpLib\Wire\AMQPReader-&gt;read(7)</p>
  <h1>3 /var/www/html/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(555):</h1>
  <p>PhpAmqpLib\Connection\AbstractConnection-&gt;wait_frame(0)</p>
  <h1>4 /var/www/html/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(217):</h1>
  <p>PhpAmqpLib\Connection\AbstractConnection-&gt;wait_channel(0, 0)</p>
  <h1>5 /var/www/html/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(328):</h1>
  <p>PhpAmqpLib\Channel\AbstractChannel-&gt;next_frame(0)</p>
  <h1>6 /var/www/html/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(205):</h1>
  <p>PhpAmqpLib\Channel\AbstractChannel-&gt;w in
  /var/www/html/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 242</p>
  </blockquote>