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

版主: DarkSkyline

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

文章DarkSkyline » 週六 12月 9日, 2006年 8:41 am

錯誤代碼如下:
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 資料庫測試看看有無問題.
http://www.ublink.org
Tel:04-22605121
E-Mail:eric@ublink.org
Skype:ublink-eric
LineID:0937720133
頭像
DarkSkyline
Site Admin
 
文章: 1860
註冊時間: 週五 12月 8日, 2006年 11:41 am
來自: 台中
送出感謝: 0 次
擁有感謝: 2

回到 windows 作業系統

誰在線上

正在瀏覽這個版面的使用者:Google [Bot] 和 28 位訪客