網頁

2005年9月29日 星期四

微軟在莫名其妙啦!

昨天把 blog.cookys.org 的 dn 給指過來,然後就發生一連串的靈異事件,每次都用的好好的,然後寫完要按 publish 的時候就會跳到舊的那個 blog 去 -_-。所以早上一氣之下就把舊的那台的 apache 給關了,沒想到剛剛就因為這樣 lose 一篇 post -_-,直接找不到網頁 -_-。本來想說是不是我的 serial 弄錯了,結果一看沒有阿,其他機器都查的好好的,似乎只有我桌機在哭 -_-,查了一下發現靈異現象,推測應該跟 dns cache 機制有關:

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\cookys>ping blog.cookys.org

Pinging blog.cookys.org [210.59.67.2] with 32 bytes of data:

Reply from 210.59.67.2: bytes=32 time=49ms TTL=52
Reply from 210.59.67.2: bytes=32 time=52ms TTL=52
Reply from 210.59.67.2: bytes=32 time=49ms TTL=52
Reply from 210.59.67.2: bytes=32 time=64ms TTL=52

Ping statistics for 210.59.67.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 49ms, Maximum = 64ms, Average = 53ms

C:\Documents and Settings\cookys>nslookup blog.cookys.org
Server:  dns.hinet.net
Address:  168.95.1.1

Name:    blog.cookys.org
Address:  140.134.26.72

C:\Documents and Settings\cookys>

然後我跑去查 Google://windowsxp dns cache 找到一頁看起來有用的:
http://www.vlaurie.com/computers2/Articles/dnscache.htm
然後在跑去命令提示字元下查一次:

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\cookys>nslookup blog.cookys.org
Server:  dns.hinet.net
Address:  168.95.1.1

Name:    blog.cookys.org
Address:  140.134.26.72


C:\Documents and Settings\cookys>ping blog.cookys.org

Pinging blog.cookys.org [140.134.26.72] with 32 bytes of data:

Reply from 140.134.172.253: Destination net unreachable.
Reply from 140.134.172.253: Destination net unreachable.

Ping statistics for 140.134.26.72:
    Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
Control-C
^C
C:\Documents and Settings\cookys>ping blog.cookys.org

Pinging blog.cookys.org [140.134.26.72] with 32 bytes of data:

Reply from 140.134.172.253: Destination net unreachable.
Reply from 140.134.172.253: Destination net unreachable.

Ping statistics for 140.134.26.72:
    Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
Control-C
^C
C:\Documents and Settings\cookys>nslookup blog.cookys.org
Server:  dns.hinet.net
Address:  168.95.1.1

Name:    blog.cookys.org
Address:  140.134.26.72


C:\Documents and Settings\cookys>

現在是怎樣?這年頭連 DNS 都要玩 RR 嗎? -_-
不管怎樣看起來都是微軟在搞鬼 -_-

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 。至於舊網址,會先丟一陣子。等我搞定之後自然會把網址導回來。