moodle是個好東西,安裝也很順利,但是在centos4.2+apache2+php4下出現了一些問題:
1、不能登陸,說是cookie沒有開啟,原因是在setCookie之前有header輸出
在index.php的最前面加上
?require_once('lib/moodlelib.php');
?if (get_moodle_cookie() == '') {
???? set_moodle_cookie('nobody');
?}
2、文件不能下載,原因同樣是在文件下載header之前有了輸出
在lib/file.php第1行加ob_start()
在send_file()之前加ob_end_clean()把緩沖清除掉
3、上傳文件不能有中文文件名
在config.php里加$CFG->unicodecleanfilename = true;
4、下載文件中中文文件名亂碼(不是很好的解決方案,不能滿足國外用戶訪問了)
在lib/filelib.php的send_file中對$filename做utf8->gbk的轉碼
1、不能登陸,說是cookie沒有開啟,原因是在setCookie之前有header輸出
在index.php的最前面加上
?require_once('lib/moodlelib.php');
?if (get_moodle_cookie() == '') {
???? set_moodle_cookie('nobody');
?}
2、文件不能下載,原因同樣是在文件下載header之前有了輸出
在lib/file.php第1行加ob_start()
在send_file()之前加ob_end_clean()把緩沖清除掉
3、上傳文件不能有中文文件名
在config.php里加$CFG->unicodecleanfilename = true;
4、下載文件中中文文件名亂碼(不是很好的解決方案,不能滿足國外用戶訪問了)
在lib/filelib.php的send_file中對$filename做utf8->gbk的轉碼