這一頁包含人們安裝Moodle時,最常問的一些問題。如果你有遵循安裝說明 但仍遇到困難,那麼這一頁可能對你有幫助。
如果再這一頁找不到你要的答案,那試著到moodle.org 的 使用 Moodle 課程。 從以關鍵字在討論區搜尋開始,說不定你的問題已經曾被討論過。 如果你找不到你要的,那就試著把你的問題挑倒是當的討論區。 - 或許有某個人能夠幫助你。
如果你是過多種方法,仍無法解決問題,且你的moodle是在防火牆(Firewalls)之後運作,或許你應該是著重新設定你的防火牆,以確保它沒有阻礙了必要的功能或需要的溝通。防火牆很少對 Moodle 造成問題,但偶爾會因為設定錯誤,而減損了它的功能。
使用下列表單跳到下列適當的答案上:
當我試著去取用或檢視我上傳的檔案時,我得到"找不到檔案" 的錯誤訊息
我的頁面顯示有嚴重錯誤,例如:call to undefined function: get_string()
為什麼我一直得到錯誤訊息說:"headers already sent"?
I keep getting this error: Failed opening required '/web/moodle/lib/setup.php'
Any text I add with an apostrophe (') or a quote (") causes errors or comes up with a slash added
當我進入管理頁面時,I get told to make dirroot blank!
I login but the login link doesn't change. I am logged in and can navigate freely.
例如說您看到: Not Found: The requested URL /moodle/file.php/2/myfile.jpg was not found on this server.
您的網頁伺服器需要被設定成允許腳本名稱之後的 URL 可以直接傳遞給這腳本。在Apache 1上,它通常是開啟的,但是在Apache 2上,預設通常是關閉的。 要開啟它,把這行加到伺服器的 httpd.conf 檔案中,或加到本地目錄的 .htaccess 檔案中 (參見 安裝說明 會有詳細說明):
AcceptPathInfo on
注意,這只對Apache版本2.x有效。
如果您不是用 Apache 2,而仍然有這問題(不太可能), 那您可以透過 Moodle使用替代的解決方式。缺點是 回應速度會稍微便慢,且您無法在 HTM 資源中使用相對連結。
要使用這一替代方法:以管理員身分登入,進入 "設定變項"頁面,並更改 "slasharguments"的設定。 您現在應該能存取您的上傳檔案了。
在您的網站裡建一個新檔,命名為 info.php,裡面輸入下列文字,然後用您的瀏覽器打開它:
<?PHP phpinfo() ?>
如果沒看到什麼,那您就是沒安裝 PHP。請參見安裝文件,您可找到在哪裡可以下載該程式的資訊。
檢查在 config.php 的根目錄(dirroot)變項。您必須使用完整的絕對路徑名稱,例如:
$CFG->dirroot = "d:\inetpub\sites\www.yoursite.com\web\moodle";
使用 Redhat Linux 平台者,請參見: Redhat Linux
如果您看到的錯誤訊息像這樣:
Parse error: parse error, unexpected T_VARIABLE in c:\program
files\easyphp\www\moodle\config.php on line 94
Fatal error: Call to undefined function: get_string() in c:\program files\easyphp\www\moodle\mod\resource\lib.php
on line 11
這可能是您在 config.php 中,留下多餘的分號或引號 (第94行).
另一個理由是,您曾經以一般文書編輯程式,像 Word 來開啟 config.php 檔,然後把它 存成 HTML網頁格式,而非純文字檔。
如果您看到的錯誤訊息像這樣:
Warning: Cannot add header information - headers already sent by (output started at /webs/moodle/config.php:87) in /webs/moodle/lib/moodlelib.php on line 1322
Warning: Cannot add header information - headers already sent by (output started at /webs/moodle/config.php:87) in /webs/moodle/lib/moodlelib.php on line 1323
Warning: Cannot add header information - headers already sent by (output started at /webs/moodle/config.php:87) in /webs/moodle/login/index.php on line 54
You have blank lines or spaces after the final ?> in your config.php file. Sometimes text editors add these - for example Notepad on Windows - so you may have to try a different text editor to remove these spaces or blank lines completely.
In your config.php, the setting that you use for the dirroot variable must be the complete path from the root of your server's hard drive.
Sometimes people only use the path from their home directory, or relative to the root of the web server directory.
Problems caused by apostrophes are caused by incorrect "magic quotes" settings. Moodle requires the following settings (which are usually the default):
magic_quotes_gpc = On
magic_quotes_runtime = Off
See the section on webserver configuration in the Installation docs for more details.
如果您看到的錯誤訊息像這樣
Warning: session_start() [function.session-start]: open(/tmp\sess_d40f380d37d431fc1516e9a895ad9ce0, O_RDWR) failed: No such file or directory (2) in G:\web\moodle\lib\setup.php on line 123
Warning: session_start() [function.session-start]: open(/tmp\sess_d40f380d37d431fc1516e9a895ad9ce0, O_RDWR) failed: No such file or directory (2) in G:\web\moodle\lib\setup.php on line 123
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at G:\web\moodle\lib\setup.php:1) in G:\web\moodle\lib\setup.php on line 123
... these are all related to the fact that PHP is failing to save "session" files on your hard disk (在目錄/tmp). Usually the reason is that you don't HAVE a directory called /tmp on your computer. 這通常是安裝在 Windows 上,才會發生。
The solution is to fix the PHP setting for this path to point to a real directory. You can do this in your php.ini file:
session.save_path = C:\temp
or otherwise in a .htaccess file in your main moodle directory:
php_value session.save_path "/home/moodle/sessions"
If you see errors like this in Moodle 1.0.9:
請修改您在 config.php 的設定:
您有: $CFG->dirroot = "/home/users/fred/public_html/moodle"; 但它應該是: $CFG->dirroot = ""; |
then you have encountered a small bug that occurs on some servers. The problem is with the error-checking mechanism, not with your actual path. To fix it, find this line (line 66) in the file admin/index.php:
if ($dirroot != $CFG->dirroot) {
更改它成為這樣:
if (!empty($dirroot) and $dirroot != $CFG->dirroot) {
Make sure the URL in your $CFG->wwwroot setting is exactly the same as the one you are actually using to access the site.
Assuming you are using Apache, then it's quite likely that your setting in config.php for $CFG->wwwroot is different from the actual URL you are using to access the site. Also try turning off "secureforms" in the admin settings.
This is a known bug in versions of Moodle up to 1.0.9, now fixed in the main code and version 1.1.
It doesn't affect all people, it only occurs when the person installing Moodle has a cookie in their browser from another program on the same site, called "user", "admin", or "teacher".
Quick fixes include deleting those cookies from your browser before installing, using a different browser, or editing the file moodle/admin/user.php to insert these lines near the top:
unset($user);
unset($admin);
unset($teacher);
After performing any of these fixes it might be a good idea to drop all the tables in your database and re-install again from scratch.
The most common cause for this is that your own computer (not your Moodle server) has a firewall that is stripping referrer information from the browser. Here are some instructions for fixing Norton firewall products.
The server admin can also fix this for everyone by editing the Moodle configuration page and changing the variable "secureforms" to "No".
Another possible cause of this problem is that sessions are not configured properly on the server. You can test this by calling the script http://yourserver/moodle/lib/session-test.php.
There are two main things you need to make a copy of: the database and the uploaded files. The Moodle scripts themselves are less important, since you can always download a fresh copy if you have to.
There are many ways to do such backups. Here is an outline of a little script you can run on Unix to backup the database (it works well to have such a script run daily via a cron task
cd /my/backup/directory
mv moodle-database.sql.gz moodle-database-old.sql.gz
mysqldump -h example.com -u myusername --password=mypassword -C -Q -e -a mydatabasename > moodle-database.sql
gzip moodle-database.sql
For the files, you can use rsync regularly to copy only the changed files to another host:
rsync -auvtz --delete -e ssh mysshusername@example.com:/my/server/directory /my/backup/directory/
Each language requires a specific language code (called a locale code) to allow dates to be displayed correctly. The language packs contain default standard codes, but sometimes these don't work on Windows servers.
You can find the correct locale codes for Windows on these two pages: Language codes and Country/region codes.(eg "esp_esp" for spanish)
These new locale codes can be entered on the Admin -> Configure -> Variables page, where they override the ones in the currently chosen language pack.
You must set up cron properly if you want Moodle to send out automatic email from forums, assignments etc. This same process also performs a number of clean-up tasks such as deleting old unconfirmed users, unenrolling old students and so on.
Basically, you need to set up a process to regularly call the script http://yoursite/admin/cron.php. Please see the section on cron in the Installation documentation.
Tip: Try the default setting in Moodle variables page. Leave the smtphost blank. This will be acceptable for the majority of users.
Suggest a new FAQ (include the answer!)
Thanks to John Eyre for helping to maintain this FAQ.
Version: $Id: faq.html,v 1.6 2003/03/30 13:54:28 moodler Exp $