星期四, 10月 23, 2008

[FreeBSD] 升級 clamav 0.94

前幾天終於把mail server這台被我另外加上很多用途的 server 從 6.1 升級為 6.3。
目前看起來還順利。

不過,原本以前 clamav 0.92 可以順利升級為 0.94,卻在編譯時,出現錯誤訊息
../libclamav/.libs/libclamav.so: undefined reference to
`gethostbyname_r'
*** Error code 1

Stop in /usr/ports/security/clamav/work/clamav-0.94/clamscan.
*** Error code 1

Stop in /usr/ports/security/clamav/work/clamav-0.94.
*** Error code 1

Stop in /usr/ports/security/clamav/work/clamav-0.94.
*** Error code 1

Stop in /usr/ports/security/clamav.
*** Error code 1

Stop in /usr/ports/security/clamav.

這個問題沒看過,嘿!趕緊上網求 GOOGLE大神,果然有人在討論,有位網友(kwijibo)提到可以直接把 Makefile 檔案內的 CONFIGURE_ARGS 這個變數內把 --enable-gethostbyname_r 刪掉。

直接試一下,嘿!果然成功!!記得要先 make clean再重新 make 喔!

星期一, 10月 13, 2008

手動移除 VirtualBox Guest Additions

突然想在 Ubuntu 中移除VirtualBox,所以找了一下資料,移除方式如下:
sudo find /etc -name "*vboxadd*" -exec rm {} \;


sudo find /etc -name "*vboxvfs*" -exec rm {} \;


sudo rm -r /usr/src/vboxadd-*


sudo rm -r /usr/src/vboxvfs-*


sudo rm /usr/sbin/vboxadd-timesync


sudo rm /lib/modules/`uname -r`/misc/vboxadd.ko


sudo rm /lib/modules/`uname -r`/misc/vboxvfs.ko


星期日, 10月 05, 2008

firefox 3.0 升級為 3.0.1 後無法開啟 VMware Server Remote Console

解決辦法:
在終端機中
$ cd ~/.mozilla/

$ find . -type d -iname "VMwareVMRC@vmware.com"

會找到類似
./firefox/njx4m1zl.defaultextensions/VMwareVMRC@vmware.com</pre></blockquote><code></code>切換至該目錄<br /><blockquote><pre>$ cd ./firefox/njx4m1zl.defaultextensions/VMwareVMRC@vmware.com</pre></blockquote>
先備份然後再開啟 <i><b>install.rdf</b> </i>檔案<br />
<br />
<blockquote><code>$ cp install.rdf ~/install.rdf.bak</code><br /><code>
$ vi install.rdf</code><br /></blockquote>
找到下列內容:
<blockquote><pre><em:maxVersion>3.0.0.*</em:maxVersion></pre></blockquote>
<p>將<i><b>3.0.0.*</b></i> 改成 <i><b>3.0.1.*</b></i> ,存檔後再開啟 firefox 就可以了。 <br /></p>
<blockquote><pre><em:maxVersion>3.0.1.*</em:maxVersion><br />

星期三, 8月 06, 2008

Perl 基本學習(1)

Perl 初學
清單
($a, $b) = (10, 20);
陣列
#----------------------
@a = (10, 20, 30);
#----------------------
result:
$a[0] = 10;
$a[1] = 20;
$a[2] = 30;
#----------------------
@a = ("台北縣樹林市", 238);
#----------------------
result:
$a[0] = "台北縣樹林市";
$a[1] = 238;
清空陣列
#----------------------
@a = ();
#----------------------

參照陣列元素
將值代入陣列元素
ex1:
#----------------------
@a = ("One", "Two", "Three");
@a[0] = 1;
@a[1] = 2;
@a[2] = 3;
$n = 2;
print $a[$n];
#----------------------
result: 3
#----------------------

ex2:
#----------------------
@a = (1,2,3,4);
print "$a[0] ";
print "$a[1] ";
print "$a[2] ";
print "$a[3] ";
#----------------------

將清單代入陣列各個元素
ex1:
#----------------------
@a = (1, 2, 3);
($a1, $a2) = @a;
#----------------------

ex2:
#----------------------
@a = (1, 2, 3);
($a1, $a2, $a3, $a4) = @a;
#----------------------
$a4 為空值,沒有代入任何值

陣列的索引
@a = (1, 2, 3);
$a[0], $a[1], $a[2]
or
(在 perl 中陣列的最後一個元素以 -1 來表示,所以也可以寫成)
$a[-3], $a[-2], $a[-1]

陣列的元素數
在陣列名稱前加上「$#」,可求得元素索引的最大值
@a = (1, 2, 3, 4);
print $#a;
#-------------------------
result: 3

陣列的大小
對索引指定元素數以上的數字時,陣列的元素數會自動擴大
@a = (1,2,3);
$a[10] = 10;
print $#a;
#----------------------
result: 10

若將清單代入陣列中,陣列的元素數會變成清單的元素數。
@a = (1,2,3,4,5,6);
@a = (6,7,8);
print $#a;
#----------------------
result: 2

關連陣列:將 key 和 value 整合的陣列, 關連陣列以「 %」符號來做宣告。
%a = ("name", "bobo", "num", 3, 10, 100);
#or
%a = ("name"=> "bobo", "num"=> 3, 10=> 100);
#---------------------------
result:
$a{"name"} = "bobo";
$a{"num"} = 3;
$a{10} = 100;

清空關連陣列
%a = ();

星期日, 8月 03, 2008

將 GridView 內容匯出成 Excel 檔案問題

每次遇到這個問題都要上網查一下,把章立民研究室回答的內容做個連結,下次就比較方便了啦!
將 GridView 內容匯出成 Excel 檔案問題

星期六, 7月 05, 2008

news: Google釋出內部安全偵測工具RatProxy原始碼

iThome online : : 新聞內容
Google釋出內部安全偵測工具RatProxy原始碼

詳情請查詢閱讀原文網址
http://www.ithome.com.tw/itadm/article.php?c=49717

星期五, 7月 04, 2008

moodle各版本安裝時所需的環境

轉載 moodle官網 http://docs.moodle.org/en/Environment

Moodle version 1.5.3


  • MySQL version - 3.23 or later is required
  • PHP version - 4.1.0 or later is required
  • The php_extension mbstring is recommended to be installed/enabled

Moodle version 1.6


  • MySQL version 4.1.12 or later for sites that are exclusively Latin-1, 4.1.16 if you have other languages, or PostgreSQL 7.4.x or later
  • PHP version 4.3.0 or later is required (but don't use versions 5.0.0 to 5.0.6 which were buggy)
  • The php_extension iconv is recommended to be installed/enabled
  • The php_extension mbstring is recommended to be installed/enabled

Moodle version 1.8



Moodle version 1.9



Moodle version 2.0