WordPress 的小日曆 bug

2005 May 31

剛剛我發現我這裡的 calendar 已經跳到 6 月, 像這樣 :
WP Calendar error

於是去看了 , 也都有這個問題.

看過程式之後, 果然是 gmt_offset 所產生的問題.

因為在 wp-includes/functions.php 中的 current_time 這個 function 提供了兩種格式: mysql 跟 timestamp .
而 mysql 的格式用了 gmdate , 所以加上 gmt_offset 之後是沒問題的.
timestamp 卻因為使用了 time , 所以再加上 gmt_offset 之後會出現異常.
因為我發現只有 calendar 出問題, 所以我只改了 wp-includes/template-functions-general.php 這個檔案, 沒有修改 current_time 這個 function .

如果您的站台的 calendar 也有相同問題的話, 請修改 wp-includes/template-functions-general.php , 把原先這兩行註解掉:

$thisyear = gmdate('Y', current_time('timestamp') + get_settings('gmt_offset') * 3600);
$thismonth = gmdate('m', current_time('timestamp') + get_settings('gmt_offset') * 3600);


加進這兩行 :

$thisyear = gmdate('Y', current_time('timestamp'));
$thismonth = gmdate('m', current_time('timestamp'));


也就是變成這樣 :

// $thisyear = gmdate('Y', current_time('timestamp') + get_settings('gmt_offset') * 3600);
// $thismonth = gmdate('m', current_time('timestamp') + get_settings('gmt_offset') * 3600);
$thisyear = gmdate('Y', current_time('timestamp'));
$thismonth = gmdate('m', current_time('timestamp'));


如果您有 shell login 權限的話, 可以到您的 WordPress 主目錄, 然後抓取 這個檔案 後用這個指令做修正 :

patch < template-functions-general.diff.txt

艾葳的 8-way Opteron 系統

國外已經有人進行效能測試了, 文章 在這 .

128GB 的 RAM 不說, 光是看到 這張圖 , 就夠迷人了… orz

phpBB is a pain!?

前陣子在 Weblog Tools Collection 出現 這篇 .

如果是從以前就有在看我這個 Blog 的人, 應該也都看過 phpBB 的版本更新訊息.

在各種論壇系統裡面, phpBB 的效能算是很好的一套, 而且在全世界站台中, 使用的比率又很高. 於是, phpBB 便成了許多攻擊者的頭號目標 ( 樹大招風!? ) .

當然, 還是老話.
世界上沒有絕對安全的系統, 只有絕對勤勞的系統管理/維護人員.
( 不過可能已經有不少人因為這個因素而跳槽使用別的系統了. XD )

Newzilla.org 消失了.. O_O

2005 May 24

因為之前在自己的 wiki 上面有整理 Newzilla 的文章, 所以剛剛想再去翻翻有沒有新文件出版.

赫然發現 Newzilla 一直連不上. O_O

不過, 我們這種小晚輩也沒資格說話, 現在只能祈禱它趕快恢復營業了. XD

Blog 軟體效能測試

剛剛看到 這篇 .

這好像是目前大家在選擇 Blog 系統軟體時所缺乏的資訊!?
不過比較的軟體好像不夠多. orz

新竹爛店-上禾

2005 May 20

幾個小時前, 我跟 memphis, Solaris, wise , 還有 Natalie 去明湖路上新開的上禾美食料理用餐.

老實說, 他們的熟食還好, 生魚片也還能接受.
可是在燒烤方面, 料就少很多, 只有豬肉串, 牛肉串, 看起來怪怪的扇貝, 魚下巴.
在熱炒方面, 我們點了很多次的孔雀蛤, 可是到了後來卻變成炒文蛤, 而且很多都是沒熟的.
( 會知道沒熟的原因是因為我們把沒開的丟上燒烤的網子烤, 文蛤才開… )

比較勁爆的是, 我們在用餐期間還出現了一段小插曲 :
Solaris 吃到加料的蛋塔! XD
圖片在這邊 :
加料的蛋塔

以晚餐 550 ( 加了一成服務費 ) 的價格, 我寧可多花個一百塊左右去 喜多屋 .
這間店雖然有某些東西還不錯, 可是, 我以後再也不會去了.

PS. 我對不起大家, 帶著大家陪我去挑戰….. orz

nVidia GeForce 7800 GTX (G70)…

剛剛看到的, G70 的 Spec :

  • 0.11 micron process
  • 430Mhz core / 1.4GHz 256MB GDDR3 memory
  • 256-bit memory interface
  • 38.4GB/s memory bandwidth
  • 10.32Bps Fill Rate
  • 860M vertices/second
  • 24 pixels per clock
  • 400MHz RAMDACs
  • NVIDIA CineFX 4.0 engine
  • Intellisample 4.0 technology
  • 64-bit FP texture filtering & blending
  • NVIDIA SLI Ready (7800 GTX only)
  • DX 9.0 / SM 3.0 & OpenGL 2.0 supported

  • G70 有三種版本 : GTX, GT 跟 Standard .
    比較嚇人的是這段 :

    Single card requires min. 400W PSU with 12V rating of 26A
    SLI configuration requires min. 500W PSU with 12V rating of 34A


    如果消息沒錯的話, 會在今年 6 月底現身.

    PS3 的規格與報價

    2005 May 19

    最近 XBOX 360 PS3 的相關消息都一直受到大家的矚目, 因為 PS2 平台上的大作甚多, 所以我比較關心 PS3 的消息. :oops:

    其中, PS3 的規格可以在 這裡 看到.
    蠻令我震驚的是, PS3 的中央處理器當真衝到 218 GFLOPS 的運算能力, 系統則到達了 2 TFLOPS. ( Sony 當初說要讓 PS3 的運算能力達到 PS2 的 30 倍以上, 果真做到了! )
    另外, 雖然支援了 Blu-ray Disc , 卻沒有損失向下相容性, 完全支援 PS PS2 的遊戲. :shock:
    而且, PS3 PS2 一樣可以加裝硬碟 (只是 PS3 支援的是 2.5” 的 HDD ).

    大家看到這種規格後, 不免對價格有所揣測 ( 我也不例外 ) .
    甚至還有人預估售價可能會比 Blu-ray Disc 錄放影機的 2800 美金還高.

    不過, 我剛剛看到 這篇 .

    According to the May 17 article, Sony officials told the paper that the PS3 will go on sale in Japan with a launch price of “less than 50,000 yen” – approximately $465 or UKP 255 at current exchange rates.


    當初 PS2 不過也才 299 美金, PS3 開出這種驚人的價格, 接下來可能是要看 XBOX360 要怎麼出招了吧!? :cool:

    P4 的 HT 出包了!? O_O

    2005 May 17

    剛剛看到 這篇 :

    根據英屬哥倫比亞溫哥華市一位23歲的博士班研究生Colin Percival表示,首次在Pentium 4中推出的「超執行緒」(Hyperthreading)技術,讓駭客可以存取安全資訊。

    週五在加拿大渥太華舉行的BDSCan大會上他在一份報告中揭發了這種攻擊──利用安裝於伺服器上的間諜程式,然後和OpenSSL加密程式共享L2快取記憶體。間諜程式觀察特定快取的執行時間,然後扣除其他流程的時間(Percival稱之為「快取的腳印」(footprints in the cache),藉此收集有助於破解密碼的有用資訊。
    而且到了文章快結尾時還有 :

    不過,英特爾預計未來版本的微軟Windows和Linux作業系統將解決這個問題。


    看來問題不大!? 不然等到未來版本的 Windows ( Longhorn !? ) , 那已經是 2006 年的事了吧! XD

    phpBB 2.0.15 released !

    2005 May 13

    先貼 2.0.13 跟 2.0.14 的變動 :

    • Hardened author and keyword search a bit to not allow very server intensive searches
    • Fixed full path disclosure in bad word parsing
    • Resetting complete userdata array in session code if authentication fails
    • Fixed bug in moderator control panel where certain parameters could lead to an “error creating new session” sql error
    • Fixed bug in session code where empty page ids could lead to an “error creating new session” sql error
    • Fixed html handling in signatures if html is turned off globally
    • Fixed install.php problem with PHP5 register_long_arrays option turned off
    • Fixed potential issues with styling system
    • Added correct class to login_body template file
    • Removed file db/oracle.php from package
    • Removed version number from message body page in /admin (if user is not an admin) – mikelbeck
    • Fixed case-sensitivity issues in postgres7.php – R45
    • 2.0.15 修正了安全性問題 :

      includes/bbcode.php 的這段 :
      {
      global $lang, $bbcode_tpl;

      下面加進這行 :
      $text = preg_replace('#(script|about|applet|activex|chrome):#is', "\1&#058;", $text);
      另外是這段 :
      */
      function make_clickable($text)
      {

      下面加進這行 :
      $text = preg_replace('#(script|about|applet|activex|chrome):#is', "\1&#058;", $text);


      所以總共有這些變動 :

      • Fixed moderator status removal in groupcp.php
      • Removed newlines after ?> on some files – Thoul
      • Added admin re-authentication (admin needs to login seperatly to access the ACP) – backported from Olympus
      • Fixed vulnerability in url/bbcode handling functions – PapaDos and Paul/Zhen-Xjell from CastleCops
      • Fixed issue in admin/admin_forums.php
      • Suppressed warning message for fsockopen in /includes/smtp.php – Thoul
      • Fixed bug in admin/admin_smilies.php (admin is able to add empty smilies) – Exy
      • Adjusted documents to reflect the urgent need to update the files too (not only running the database update script)
      • Updated the readme file
      • Added one new language variable
      • Added general error if accessing profile for a non-existent user
      • Changed session id generation to be more unique – Henno Joosep
      • Fixed bug in highlight code to escape characters correctly
      • Reversed the 2.0.14 fix for postgresql because it produced more problems than it solves.
      • Added reference to article written by R45 about case-sensitivity in postgreSQL to the readme file
      • Fixed bypassing of validate_username on registration – Yen
      • Empty url/img bbcodes no longer get parsed
      • 竹貓星球 也有這兩篇公告 :
        [2005/04/25] phpBB 2.0.14 安全性修正版(包含更新檔)
        [2005/05/08] phpBB 2.0.15 安全性修正版本