Forum Moderators: coopster

Message Too Old, No Replies

MySQL charset problem

         

mms19

6:08 am on Feb 26, 2005 (gmt 0)

10+ Year Member



I am trying to learn the PHP + MySQL for Web site. So, I set up PHP 4.3.10 and MySQL 4.1.10 on my Windows 2003 server and the system seems to be working fine.

Now I seem to get a problem on the charset. If I have the line of

$link = mysql_connect($host, $user, $password);
// $host is my local host name
// $user is username for the host
// $password is the password for the user of the host

in my php Web page file, I will get the error message of

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

I have been searching for solution on the Net for a week but just cannot find the answer.

Hopefully there is someone knows the fix here.

Thank you.

ergophobe

4:47 pm on Feb 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Start here:

[dev.mysql.com...]

I don't know what your problem is, but here's a hunch to get you started anyway and at least generate some discussion.

Where is MySQL installed on your system? If, for example, it's in C:\Program Files\mysql, then it's looking for these two files in the wrong place:

c:\mysql\share\charsets\?.conf
c:\mysql\share\charsets\Index

Not finding the .conf or c:\mysql\share\charsets\Index

it fails because you are using an unexpected charset (utf-8 on Windows probably if bug 312 [bugs.mysql.com] and bug 276 [bugs.mysql.com] are any guide). This could be caused, for example, if you are using any characters that are not in the ISO-8859-1 charset in your password, username or host (which would be odd, yes, so it's probably something else).

The dirty fix would seem to be to make a C:\msyql\share\charsets\ directory and copy the contents of your current install to that location.

The better solution would be to set up mysql to know where it is and to look for the charsets in the location they should be in.

mms19

2:40 am on Feb 27, 2005 (gmt 0)

10+ Year Member



I have reviewed [dev.mysql.com...] and [bugs.mysql.com...] and tried a few of what they suggested. But my problem still exists.

I have MySQL installed in C:\MySQL and the folders in C:\MySQL are
C:\MySQL\bin\
C:\MySQL\data\
C:\MySQL\Docs\
C:\MySQL\include\
C:\MySQL\lib\
C:\MySQL\share\

Just don't know if there is any folder I missed?

There is no .conf and Index file in my C:\MySQL\share\charsets\

Instead, there are
armscii8.xml
ascii.xml
cp1250.xml
cp1251.xml
cp1256.xml
cp1257.xml
cp850.xml
cp852.xml
cp866.xml
dec8.xml
geostd8.xml
greek.xml
hebrew.xml
hp8.xml
Index.xml
keybcs2.xml
koi8r.xml
koi8u.xml
languages.html
latin1.xml
latin2.xml
latin5.xml
latin7.xml
macce.xml
macroman.xml
README
swe7.xml

Do I need to creat .conf and Index file?

Thank you