Click to See Complete Forum and Search --> : undefined function mb_convert_encoding() in PHP 4.3.8?


ppowell
03-15-2006, 05:56 PM
print_r("UPDATE student SET uuid = concat(UUID(), '" . mb_convert_encoding('_' . randstring(16), 'UTF-8', 'auto') . "') WHERE uuid IS NULL OR uuid != '' LIMIT 1<P>");


produces


Fatal error: Call to undefined function: mb_convert_encoding() in blah.php on line 1


Where line 1 is the print_r()

I'm using PHP 4.3.8, what on earth?!

Thanx
Phil

samudasu
03-15-2006, 06:08 PM
Are you sure multi byte string functions are enabled in your server? They're not configured in by default. It doesn't appear that they are, that's why you're getting an undefined function error.

bogu
03-15-2006, 06:10 PM
Hi hi hi, u find the solution for your other problem and now u get another probleme...

I think today is not such a good day for coding, for u ... :D

I run that line on my server and I'm using PHP 4.3.11 and it worked, I think that version of PHP is bugged...

ppowell
03-15-2006, 06:16 PM
Are you sure multi byte string functions are enabled in your server? They're not configured in by default. It doesn't appear that they are, that's why you're getting an undefined function error.

IS there an alternative then? I tried utf8_encode() but that also fails to encode into UTF-8 encoding.

My MySQL query continues to fail because it still thinks the string is latin_1 even though I'm converting it to UTF-8

Phil