Bug #13844 my.ini: default-character-set=multi-byte charset cause error in apache's log
Submitted: 7 Oct 2005 14:40 Modified: 7 Oct 2005 15:36
Reporter: Minfeng Zhang Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S5 (Performance)
Version:4.0.26 OS:Windows (Win32)
Assigned to: CPU Architecture:Any

[7 Oct 2005 14:40] Minfeng Zhang
Description:
For working properly with Simplified-Chinese I added an option in my.ini:
 [mysqld]
 default-character-set=gbk

it works but also causes errors in Apache's error.log, says:

File 'c:\mysql\share\charsets\?.conf' not found (Errcode: 2)
Character set '#28' is not a compiled character set and is not specified in the 'c:\mysql\share\charsets\Index' file

I know that there's no gbk.conf because gbk is a multi-byte charset, and it should compiled in Windows binaries. MySQL accept the option default-character-set but still cause errors in error.log, that make me confused. 

Actually, this bugs appears in all 4.0.x version.

How to repeat:
1. Install MySQL 4.0.x(Windows binaries), then modify my.ini, add default-character-set=gbk under [mysqld].
2. Restart MySQL, restart Apache.
3. Run php scripts that contain mysql queries. 
4. Open Apache's error.log and check the error messages.
[7 Oct 2005 14:51] Valeriy Kravchuk
So, have you recompiled mod_php or whatever you used from Apache to connect to MySQL?

Please, try to connect from standard mysql client to the sameserver and database, and execute the same queries. Inform about the results.
[7 Oct 2005 15:07] Minfeng Zhang
well, using standard mysql client will not cause the errors.
is mod_php's problem?
[7 Oct 2005 15:30] Minfeng Zhang
http://bugs.php.net/bug.php?id=32557
They said is a "support question". :(
[7 Oct 2005 15:36] Hartmut Holzgraefe
Yes, this is a PHP related problem, PHP by default uses a bundled version of the mysql client library.
It also doesn't read my.ini to fetch its configuration. To have full character set support in mod_php you need to recomile mod_php to use the the mysql client library that came with your mysql installation instead of the one that was bundled with PHP. Please check http://php.net/ for further info ...
[7 Oct 2005 15:41] Hartmut Holzgraefe
> They said is a "support question". :(

and they are absolutely right about that. You might want to try to get help
on one of the php mailing lists. See

http://www.php.net/support.php