是的
phpinfo裡面就沒有出現這兩個模組的相關設定
比方是mbstring載入後
就會出現一個mbstring的模組資訊在phpinfo中
但是mhash跟mcrypt沒有諸如此類得訊息
我也故意把msn.class.php的以下判斷敘述拿掉
if ($protocol != 'MSNP9' && !function_exists('mhash')) {
if ($protocol == 'MSNP15') die("We need mhash module for $protocol!\n");
$protocol = 'MSNP9';
}
if ($protocol != 'MSNP9' && !function_exists('mcrypt_cbc')) {
if ($protocol == 'MSNP15') die("We need mcrypt module for $protocol!\n");
$protocol = 'MSNP9';
}
想當然而螢幕上也會顯示錯誤訊息
Fatal error: Call to undefined function mhash() in C:\AppServ\www\msnclass\msn.class.php on line 1041
這一行是一個function
function derive_key($key, $magic)
{
$hash1 = mhash(MHASH_SHA1, $magic, $key);
$hash2 = mhash(MHASH_SHA1, $hash1.$magic, $key);
$hash3 = mhash(MHASH_SHA1, $hash1, $key);
$hash4 = mhash(MHASH_SHA1, $hash3.$magic, $key);
return $hash2.substr($hash4, 0, 4);
}
所以我還是覺得這兩個module我沒有裝好
所以才會請教您這個問題
不好意思打擾到您了
謝謝
另外
http://linux.tnc.edu.tw/techdoc/php/php_big5/ref.mhash.html網頁中有說這個要怎安裝
You need to compile PHP with the --with-mhash[=DIR] parameter to enable this extension. DIR is the mhash install directory.
目前還不知道怎麼用~還在研究