網頁

2005年9月8日 星期四

好不容易

總算是成功的把 latin1 -> UTF8 ,原來之前失敗的原因竟然是因為我一開始轉出來的檔案是爛的。其實想想,我最一開始轉出來的根後來正確轉出來的大小都是 6xxkb ,但是後來加了 --default-character-set=latin1 之後不知道為啥檔案變成 900k。可是我想說檔案比較大應該才算有轉完,結果沒想到這才是爛的。-_-a

所以到最後,流程大概是這樣:

  1. mysqldump --default-character-set=latin1 -uroot -p --opt wordpress > wordpress.sql
  2. mysqladmin -uroot -p drop wordpress
  3. mysqladmin -uroot -p create wordpress
  4. cp wordpress.sql wordpress_utf8.sql
  5. vi wordpress_utf8.sql
  6. *add
    SET NAMES utf8;
    SET CHARACTER_SET_CLIENT=utf8;
    SET CHARACTER_SET_RESULTS=utf8;
  7. *replace latin1 to utf8 (:1,xxxs/latin1/utf8/g)
  8. iconv -c -f big5 -t utf8 wordpress_utf8.sql
  9. mysql -uroot -p wordpress < wordpress_utf8.sql

之後發現 httpd 一直死:

pid 1165 (httpd), uid 80: exited on signal 11
pid 559 (httpd), uid 80: exited on signal 11
pid 560 (httpd), uid 80: exited on signal 11
pid 1215 (httpd), uid 80: exited on signal 11
pid 561 (httpd), uid 80: exited on signal 11
pid 1499 (httpd), uid 80: exited on signal 11
pid 1503 (httpd), uid 80: exited on signal 11
pid 1500 (httpd), uid 80: exited on signal 11
pid 1537 (httpd), uid 80: exited on signal 11
pid 1536 (httpd), uid 0: exited on signal 10 (core dumped)
pid 28006 (httpd), uid 80: exited on signal 11
pid 28007 (httpd), uid 80: exited on signal 11

試 了半天,把編譯最佳化都關完了,也把 Apache 2.1.4 換回 2.0.54 ,把 php 5.0.4 換成 4.4.0,不過結果一樣狂死。後來靈機一動想到,該不會是 database 裡的 options 作怪,於是跑去裝 phpmyadmin ;把原來的 URI 改好,就會動了 -_-。真是悲苦,不過竟然可以因為這樣搞到 Apache core dump ,也堪稱奇蹟阿。接下來下個步驟就是好好搞定這裡然後開個 plog 。至於舊網址,會先丟一陣子。等我搞定之後自然會把網址導回來。