|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22083 php-cli MySQL charset problem
Submitted: 2003-02-05 15:52 UTC Modified: 2004-02-10 07:35 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: spam at vrana dot cz Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.3.0 OS: Windows
Private report: No CVE-ID:
 [2003-02-05 15:52 UTC] spam at vrana dot cz
When I set default-character-set=win1250 in my.ini, php-cli says:

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

The problem is, that php-cli ignores character-sets-dir= in my.ini and uses its own hard-coded path c:\mysql\. If I move the share\charsets\ directory into c:\mysql\, the problem is still here because there are two backslashes in path, where php-cli tries to find it.

When I hexa edited php4ts.dll and change c:/mysql/ to c:/mysql3 and move share\charsets\ directory there, everything is working.

1. Change the default path for finding charsets from "c:/mysql/" to "c:/mysql"
2. If possible, read character-sets-dir= from C:\Windows\my.ini.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-27 07:29 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

 [2004-01-02 12:31 UTC] selfman at netax dot sk
The bug reappears in PHP 4.3.4 Win32 ISAPI Module for apache.
 [2004-01-02 12:39 UTC] spam at vrana dot cz
It's OK in 4.3.4. my.ini is still ignored, but there are no double backslash.
 [2004-01-04 17:02 UTC] selfman at netax dot sk
My APACHE error log is full of this:
File 'c:\mysql\share\charsets\?.conf' not found (Errcode: 2)
Character set '#26' is not a compiled character set and is not specified in the 'c:\mysql\share\charsets\Index' file

The mysql is not located in the default directory.
I am using the my.cnf to configure the mysql deamon.

set-variable = key_buffer=16M
set-variable = lower_case_table_names=0
set-variable = max_allowed_packet=1M
set-variable = thread_stack=128K
set-variable = flush_time=1800
basedir = C:/WWW/MySQL/
 [2004-02-10 07:35 UTC] spam at vrana dot cz
my.ini is still ignored - it will not be fixed. You must have charsets directory in c:\mysql\share\charsets.
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Mon Nov 30 00:01:32 2015 UTC