For some reason i can't change the charset of the mysqli connection to utf8mb4 on PHP 5.3.0, 5.3.1, 5.3.2, etc... up to PHP 5.4.0.
I have a class which extends mysqli and in the constructor after i successfully connect to the database, i have this code to change the connection charset
parent::set_charset('utf8mb4')
On every PHP version from 5.4.0 and above it returns true and the charset is changed, but on PHP 5.3 it always returns false and the charset remains latin1. Has anyone encountered this problem? any idea how to fix it?
PHP Info.
MysqlI Support enabled
Client API library version mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 1
Persistent cache enabled
put_hits 0
put_misses 0
get_hits 0
get_misses 0
size 2000
free_items 2000
references 3
Directive Local Value Master Value
mysqli.allow_local_infile On On
mysqli.allow_persistent On On
mysqli.cache_size 2000 2000
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.max_persistent Unlimited Unlimited
mysqli.reconnect Off Off
mysqlnd
mysqlnd enabled
Version mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $
Command buffer size 2048
Read buffer size 32768
Collecting statistics Yes
Collecting memory statistics Yes