I came across this weird error in unserialize() where it refused to unserialize the serialized data. After hours of trying different things to solve it, finally converting the encoding worked.
The solution to the problem is to use the following function instead of unserialize():
return unserialize( trim( mb_convert_encoding( $str,'auto','UTF-8' ) ) );
I was trying to compile sphinx server from source but I go the following errors on executing make
undefined reference to `libiconv_open’
undefined reference to `libiconv’
undefined reference to `libiconv_close’
To fix the error, you can compile without iconv (multiple encoding support) support. Use the following commands to compile. You can add more parameters as per your requirements.
I hope that helps