php.net |  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
Votes:1
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: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
21 - 1 = ?
Subscribe to this entry?

 
 [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.

Solution:
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-27 07:29 UTC] edink@php.net
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 http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net 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.

[mysqld]
port=3306
skip-locking
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
default-character-set=win1250
skip-innodb
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-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 13:01:29 2024 UTC