Thursday, December 23, 2010

凍仁的 Ubuntu 筆記: Ubuntu 9.10 sources.list

凍仁的 Ubuntu 筆記: Ubuntu 9.10 sources.list

# 國家高速網路與計算中心
deb ftp://os.nchc.org.tw/ubuntu karmic-updates main restricted universe multiverse
deb ftp://os.nchc.org.tw/ubuntu karmic main universe multiverse restricted
deb ftp://os.nchc.org.tw/ubuntu karmic-backports main universe multiverse restricted
deb ftp://os.nchc.org.tw/ubuntu karmic-proposed main universe multiverse restricted
deb ftp://os.nchc.org.tw/ubuntu karmic-security main restricted universe multiverse
deb ftp://os.nchc.org.tw/ubuntu karmic-proposed main universe multiverse restricted
deb ftp://os.nchc.org.tw/ubuntu karmic-security main restricted universe multiverse


# Debian mirror By National Taiwan University
deb http://tw.archive.ubuntu.com/ubuntu/ karmic main restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ karmic main restricted
deb http://us.archive.ubuntu.com/ubuntu/ karmic main universe restricted multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic main universe restricted multiverse

# 安全性更新伺服器
deb http://security.ubuntu.com/ubuntu/ karmic-security main universe restricted multiverse
deb-src http://security.ubuntu.com/ubuntu/ karmic-security main universe restricted multiverse

# Chromium Browser (Daily Builds)
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main

# Swiftfox Browser
deb http://getswiftfox.com/builds/debian unstable non-free

# Ubuntu Tweak
deb http://ppa.launchpad.net/tualatrix/ubuntu karmic main
deb-src http://ppa.launchpad.net/tualatrix/ubuntu karmic main

# Medibuntu Install Source (Add by Lazyscripts)
deb http://packages.medibuntu.org/ karmic free non-free

# Gcin
deb http://debian.luna.com.tw/ubuntu ./
deb-src http://debian.luna.com.tw/ubuntu ./

# Google software repository
deb http://dl.google.com/linux/deb/ stable non-free main

# Dropbox
deb http://linux.getdropbox.com/ubuntu karmic main
deb-src http://linux.getdropbox.com/ubuntu karmic main

# KompoZer
deb http://ppa.launchpad.net/giuseppe-iuculano/ppa/ubuntu karmic main

# Game
deb http://archive.getdeb.net/ubuntu karmic-getdeb games

Wednesday, December 22, 2010

VMware Communities: RuntimeFault: Database temporarily...

VMware Communities: RuntimeFault: Database temporarily...

/etc/init.d/vmware-mgmt stop

vi /etc/vmware/hostd/authorization.xml

edit the line that talks about

<NextAceId>11</NextAceId>

incrament it past the current "root" or administrator account you have.

so it now reads

<NextAceId>12</NextAceId>

I also deleted

<NextRoleId>11</NextRoleId>

doesnt seem to be used anywhere

then

/etc/init.d/vmware-mgmt start

and relogged in.

無垠天際: ZK - open source Ajax Framework介紹

無垠天際: ZK - open source Ajax Framework介紹

Sunday, December 19, 2010

php session without BOM

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at .... )

發生原因
session_start() 之前不能有任何字元輸出,UTF-8 編碼裡的 BOM 也會被認為是 headers,有上述狀況 Session 將無法順利傳遞,並會顯示錯誤訊息。

解決方法1
1. 確定 < ? php 和 session_start() 之間沒有其他字元,空格也要移除。
2. 若是 UTF-8 編碼,請用編輯器(例 UltraEdit、Notepad++...)將檔案裡的 BOM 移除。

解決方法2
以 ob_start() 開啟緩衝區將輸出資訊寫入緩衝區,可避免 headers 先於 session_start() 輸出,寫入緩衝區的內容可由 flush() 或 ob_end_flush() 輸出至瀏覽器,以下範例不會顯示錯誤訊息:
< ? php
ob_start();
echo "test";
session_start();
ob_end_flush();
? >

##HIDEME##