videlalvaro/php-amqplib — Issue #6: Problem width mbstring.internal_encoding and mbstring.func_overload 
Author: tcz
Created: 2012-01-18 14:26:01+00:00
State: open

We have found a problem which causes the client library not work under some circumstances.

If the PHP INI settings below are set the the indicated values, the client library refuses to finish the handshake.

mbstring.internal_encoding => UTF-8
mbstring.func_overload => 2

It's most likely because to implement the binary protocol you take advantage of string functions excessively.
We got around the problem by callign ini_set each time we access the library, something like this:

$original_internal_encoding = ini_get( 'mbstring.internal_encoding' );
ini_set( 'mbstring.internal_encoding', null );

// Call the php-amqp

ini_set( 'mbstring.internal_encoding', $original_internal_encoding );

...but this is quite inconvenient. Do you think this problem could be addressed inside the library?

Thank you!