1 頁 (共 1 頁)

Windows 環境下 PHP 4.x 版本連接 MySQL 4.1.x - 5.0.x 資料庫時出現錯誤

文章發表於 : 週六 12月 9日, 2006年 8:41 am
DarkSkyline
錯誤代碼如下:
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

問題描述:
Mysql 4.1.x-5.0.x 資料庫的編碼規則有了重大的改變,導致使用 PHP 4.x 版本撰寫的程式都要跟著改,可是有很多程式很難搞定這個編碼的問題,因為 MySQL 4.1.x - 5.0.x 資料庫默認字元集是 UTF8,當執行 PHP 4.x 版所撰寫的程式就會出現“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 ”之類的錯誤,好在錯誤還不影響輸出結果,但每次執行PHP程式時都會顯示錯誤訊息。

解決方法:
1.下載 Charsets 目錄:
http://www.hatea.com.tw/tech/files/mysql.zip

2.請將解開的檔案直接放在你在 Run PHP 4.x 版本的主機上

資料夾位置如下:
C:\mysql\share\charsets

3.重新再執行你要 Run 的 PHP 4.x 程式與連接 MySQL 4.1.x - 5.0.x 資料庫測試看看有無問題.