post by tommy @ 01 十一月, 2006 11:18
post by tommy @ 28 十月, 2006 13:28
post by tommy @ 28 十月, 2006 11:32
post by tommy @ 25 十月, 2006 22:26
post by tommy @ 23 十月, 2006 10:48
這東西是修改 Google Analytics 外掛來的. 因為兩者的設定很類似, 都是只有一個 ID, 所以就直接把來使用. 檔案我放在下頭的網址, 有需要就自行取用吧.
http://www.teatime.com.tw/~tommy/files/lifetype/lifetype_bloglook_plugin.tgz
post by tommy @ 22 十月, 2006 21:35
post by tommy @ 19 十月, 2006 22:23
post by tommy @ 19 十月, 2006 15:50
post by tommy @ 18 十月, 2006 18:57
post by tommy @ 18 十月, 2006 13:48
post by tommy @ 17 十月, 2006 15:05
post by tommy @ 16 十月, 2006 14:23
post by tommy @ 13 十月, 2006 19:49
post by tommy @ 20 九月, 2006 10:20
post by tommy @ 19 九月, 2006 14:03
post by tommy @ 16 九月, 2006 21:14
最近老是在我的 /tmp 裡頭, 發現有個多出來的 /tmp/cmdtemp 檔案. 也在 apache 的 error_log 中發現一些訊息如下:
sh: -c: line 1: syntax error near unexpected token `;'
sh: -c: line 1: `; 1> /tmp/cmdtemp 2>&1; cat /tmp/cmdtemp; rm ^M'
rm: cannot remove `\r': No such file or directory
sh: line 1: /tmp/cmdtemp: Permission denied
rm: cannot remove `\r': No such file or directory
sh: line 1: /tmp/cmdtemp: Permission denied
sh: -c: line 1: syntax error near unexpected token `;'
sh: -c: line 1: `; 1> /tmp/cmdtemp 2>&1; cat /tmp/cmdtemp; rm ^M'
cat: write error: Broken pipe
rm: cannot remove `\r': No such file or directory
sh: line 1: /tmp/cmdtemp: Permission denied
雖然我的 /tmp 是獨立的, 且被 mount 為 noexec, 所以上頭的指令都無法正確的執行. 不過... 為什麼會讓人家有辦法把檔案寫入 /tmp/ 內呢?
(閱讀全文)post by tommy @ 15 九月, 2006 14:33
post by tommy @ 12 九月, 2006 22:01
post by tommy @ 12 九月, 2006 12:44
post by tommy @ 11 九月, 2006 14:50
post by tommy @ 11 九月, 2006 10:01
post by tommy @ 08 九月, 2006 12:33
post by tommy @ 07 九月, 2006 17:43
post by tommy @ 24 八月, 2006 16:09
前幾天發現原本在 crond 中所發送出來的信件, 在讀取時, 都不能正確的判斷出編碼來, 需要我手動去變更讀信程式的編碼, 才能正確的讀取裡頭的中文 (UTF-8). 我記得那幾天並沒有異動 crond, 好像只有更新 postfix 到 2.3.2 的版本, 可是看起來又不像是與 postfix 有關.
看了一下所產生的信件標頭, 以前都會正確的使用 charset=UTF-8, 不過這幾天的都是顯示為 charset=ANSI_X3.4-1968, 所以讀信的軟體就沒辦法知道裡頭的內容應該是 UTF-8 才對.
最後, 在 /etc/crontab 中加上 CONTENT_TRANSFER_ENCODING 來指定 crond 所產生的 email 要使用的編碼如下:
CONTENT_TRANSFER_ENCODING="UTF-8"
這樣子重跑 crond 之後, 所產生的信件又恢復成 UTF-8 編碼了.
(閱讀全文)post by tommy @ 21 八月, 2006 16:39