3
<title>Moodle Docs: Frequently Asked Questions (FAQ)</title>
4
<link rel="stylesheet" href="docstyles.css" type="TEXT/CSS">
5
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
8
<body bgcolor="#FFFFFF">
9
<h1><font face="Arial">Các câu hỏi thường gặp(FAQ)</font></h1>
10
<p class="normaltext"><font face="Arial">Trang này chứa các câu trả lời về một số câu hỏi thường gặp ở những người cài đặt Moodle
11
. Nếu bạn đã làm theo <a href="./?file=install.html">hướng dẫn cài đặt</a> nhưng bạn vẫn gặp trục trặc
12
thì đây là nơi tốt nhất giải đáp các thắc mắc của bạn.</font> </p>
14
<p class="normaltext"><font face="Arial">Nếu không tìm thấy câu trả lời của bạn ở đây
15
thử cua học <a href="http://moodle.org/mod/forum/index.php?id=5" target="_top">Using
16
Moodle</a> trên moodle.org. Bắt đầu tìm kiếm các diễn đàn sử dụng một số từ khóa,
17
có thể vấn đề của bạn đã được thảo luận. Nếu bạn không tìm thấy bất kỳ cái gì
18
, thì thử gửi câu hỏi của bạn tới diễn đàn thích hợp - mọi người có thể sẽ giúp bạn.</font></p>
21
<p class="normaltext"><font face="Arial">Nếu bạn thử một số giải pháp
22
không giải quyết được vấn đề và bạn đang chạy bên cạnh một bức tường lửa,
23
tốt nhất bạn nên cấu hình lại bức tường lửa của bạn để đảm bảo rằng nó không ngăn chặn một
24
chức năng được yêu cầu hoặc truyền thông cần thiết. Các bức tường lửa rất
25
có thể là nguyên nhân gây ra các vấn đề của Moodle nhưng đôi khi nó là nguyên nhân của việc
26
cấu hình bị thiếu trong thiết lập cấu hình cho bức tường lửa.</font>
30
<p class="normaltext"><font face="Arial">Sử dụng danh sách này để chuyển tới các câu trả lời thích hợp với vấn đề của bạn:</font></p>
32
<p class="questionlink"><a href="#filenotfound"><font face="Arial">Bất cứ khi nào tôi thử truy cập hoặc xem một file mà tôi vừa tải lên, tôi nhận được một lỗi "File không tìm thấy "</font></a></p>
36
<p class="questionlink"><a href="#php"><font face="Arial">PHP - có phải nó đã được cài đặt và phiên bản nào tôi đang dùng ?</font></a></p>
40
<p class="questionlink"><a href="#blankpages"><font face="Arial">Tại sao tất cả các trang của tôi lại trống ?</font></a></p>
44
<p class="questionlink"><a href="#errorgetstring"><font face="Arial">Các trang của tôi xuất hiện các lỗi như : gọi một hàm chưa được định nghĩa: get_string()</font></a></p>
48
<p class="questionlink"><a href="#headerssent"><font face="Arial">Tại sao tôi nhận các thông báo lỗi về vấn đề "các phần đầu của trang sẵn sàng được gửi "?</font></a></p>
52
<p class="questionlink"><a href="#failedopen"><font face="Arial">Tôi nhận được lỗi này: yêu cầu mở bị thất bại '/web/moodle/lib/setup.php'</font></a></p>
56
<p class="questionlink"><a href="#quotes"><font face="Arial">Bất kỳ văn bản tôi thêm với một dấu nháy đơn (') hoặc một dấu nháy kép (") đều gây ra lỗi hoặc có dấu gạch chéo thêm vào</font></a></p>
60
<p class="questionlink"><a href="#sessiontmp"><font face="Arial">Tôi nhân được thông báo lỗi về session_start</font></a></p>
64
<p class="questionlink"><a href="#fixdirroot"><font face="Arial">When I go to the admin page, I get told to make dirroot blank!</font></a></p>
68
<p class="questionlink"><a href="#loginsetting"><font face="Arial">Tôi đăng nhập nhưng kết nối đăng nhập không thay đổi. Tôi được đăng nhập và có thể điều hướng tự do.</font></a></p>
72
<p class="questionlink"><a href="#resource1"><font face="Arial">Khi thử thêm một nguồn tài nguyên tôi nhận được các thông báo lỗi.</font></a></p>
76
<p class="questionlink"><a href="#noadmin"><font face="Arial">Trong quá trình xử lý thiết lập ban đầu, tôi không bao giờ nhận được yêu cầu
77
tạo một tài khoản admin!</font></a></p>
79
<p class="questionlink"><a href="#nologin"><font face="Arial">Tôi không thể đăng nhập ở bất kỳ thời điểm nào - Tôi bị mắc kẹt ở màn hình đăng nhập.</font></a></p>
81
<p class="questionlink"><a href="#backup"><font face="Arial">Làm thế nào tôi có thể sao lưu site Moodle của tôi ?</font></a></p>
83
<p class="questionlink"><a href="#locale"><font face="Arial">Tại sao site Moodle của tôi không hiển thị đúng ngày và giờ
87
<p class="questionlink"><a href="#cron"><font face="Arial">Các bản sao Email không được gửi tới các diễn đàn của tôi
90
<p class="questionlink"> </p>
98
<h3><a name="filenotfound"></a>Bất cứ khi nào tôi cố gắng truy cập hoặc xem một file mà tôi tải lên, tôi đều nhận được một
99
lỗi "File không tìm thấy "</h3>
103
<p class="answer">Ví dụ: không tìm thấy: URL được yêu cầu /moodle/file.php/2/myfile.jpg
107
không tìm thấy trên server này. </p>
111
<p class="answer">Web server của bạn cần được cấu hình lại để cho phép một phần URL sau tên một kịch bản
112
có thể được truy cập trực tiếp tới kịch bản đó. Điều này thường được cho phép trong
115
Apache 1, nhưng lại không cho phép trong Apache 2. Để bật nó thành on
119
, thêm dòng này tới httpd.conf của bạn , hoặc tới một file .htaccess trong thư mục của bạn
122
(xem <a href="./?file=install.html#webserver">Tài liệu hướng dẫn cài đặt</a>
126
để biết thêm chi tiết ): </p>
130
<p class="answercode"><b>AcceptPathInfo</b> on</p>
134
<p class="answer">Chú ý rằng, điều này chỉ làm việc đối với Apache phiên bản 2.x. </p>
138
<p class="answer">Nếu bạn không sử dụng Apache 2 và bạn vẫn gặp trục trặc
141
(hiếm khi) thì bạn có thể quay trở lại Moodle để sử dụng một giải pháp khác. Điều bất lợi ở đây là
145
nó thường không được quan tâm đối với người dùng của bạn và are a slight loss of performance for your users and you won't be able to use
149
relative links within HTML resources. </p>
153
<p class="answer">Để sử dụng phương pháp khác này: đăng nhập như là Admin, đi tới trang
157
"Cấu hình các thông số" và thay đổi thiết lập đối với "<b>slasharguments</b>".
161
Bây giờ bạn sẽ có khả năng truy cập các file bạn đã tải lên.</p>
165
<p class="answer"> </p>
173
<h3><a name="php"></a>PHP - có phải nó đã được cài đặt và phiên bản nào tôi dang dùng ?</h3>
177
<p class="answer">Tạo một file mới trên web site của bạn gọi là info.php, chứa các văn bản sau
180
, và gọi nó từ trình duyệt của bạn:</p>
188
<p class="answercode"><?PHP phpinfo() ?></p>
192
<p class="answer">Nếu không có điều gì xảy ra thì bạn không cần phải cài đặt PHP. Xem tài liệu cài đặt để biết thêm chi tiết về
197
nơi để bạn download xuống máy tính của bạn.</p>
201
<p class="answer"> </p>
205
<h3><a name="blankpages"></a>Tại sao tất cả các trang của tôi lại trống ? </h3>
209
<p class="answer">Check the dirroot variable in config.php. You must use complete,
213
absolute pathnames, eg:</p>
217
<p class="answercode"> $CFG->dirroot = "d:\inetpub\sites\www.yoursite.com\web\moodle";</p>
225
<p class="answer">Redhat Linux platform please see: <a href="http://moodle.org/doc/?file=installamp.html">Redhat Linux</a></p>
233
<h3><a name="errorgetstring"></a>My pages show fatal errors such
237
as : call to undefined function: get_string()</h3>
241
<p class="answer">If you see errors like:</p>
245
<p class="answercode">Parse error: parse error, unexpected T_VARIABLE in c:\program
249
files\easyphp\www\moodle\config.php on line 94 <br />
253
Fatal error: Call to undefined function: get_string() in c:\program files\easyphp\www\moodle\mod\resource\lib.php
261
<p class="answer">then it's likely you have left out a semi-colon or ending quote
265
from a line in config.php (previous to line 94).</p>
269
<p class="answer">Another reason could be that you have opened config.php in a
273
program like Word to edit it, and saved it as a HTML web page, instead of a
277
proper text file.</p>
285
<h3><a name="headerssent"></a>Why do I keep getting error messages
289
about "headers already sent"?</h3>
293
<p class="answer">If you see errors like this:</p>
297
<p class="answercode">Warning: Cannot add header information - headers already
301
sent by (output started at /webs/moodle/config.php:87) in /webs/moodle/lib/moodlelib.php
309
<p class="answercode"> Warning: Cannot add header information - headers already
313
sent by (output started at /webs/moodle/config.php:87) in /webs/moodle/lib/moodlelib.php
321
<p class="answercode"> Warning: Cannot add header information - headers already
325
sent by (output started at /webs/moodle/config.php:87) in /webs/moodle/login/index.php
333
<p class="answer">You have blank lines or spaces after the final ?> in your config.php
337
file. Sometimes text editors add these - for example Notepad on Windows - so
341
you may have to try a different text editor to remove these spaces or blank
345
lines completely. </p>
349
<p class="answer"> </p>
353
<h3><a name="failedopen"></a>I keep getting this error: Failed
357
opening required '/web/moodle/lib/setup.php'</h3>
361
<p class="answer">In your config.php, the setting that you use for the dirroot
365
variable must be the <strong>complete path from the root of your server's hard
373
<p class="answer">Sometimes people only use the path from their home directory,
377
or relative to the root of the web server directory.</p>
381
<p class="answer"> </p>
385
<h3><a name="quotes" id="quotes"></a>Any text I add with an apostrophe
389
(') or a quote (") causes errors or comes up with a slash added</h3>
393
<p class="answer">Problems caused by apostrophes are caused by incorrect "magic
397
quotes" settings. Moodle requires the following settings (which are usually
405
<p class="answercode">magic_quotes_gpc = On<br />
409
magic_quotes_runtime = Off</p>
413
<p class="answer">See the section on <a href="./?file=install.html#webserver">webserver
415
configuration</a> in the Installation docs for more details.</p>
417
<p class="answer"> </p>
433
<h3><a name="sessiontmp"></a>I keep getting error messages about session_start</h3>
437
<p class="answer">If you see errors like this:</p>
441
<p class="answercode">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</p>
445
<p class="answercode">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</p>
449
<p class="answercode">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</p>
457
<p class="answer">... these are all related to the fact that PHP is failing to save
461
"session" files on your hard disk (in a directory called /tmp). Usually the
465
reason is that you don't HAVE a directory called /tmp on your computer. This
469
is usually the case with Windows installations.
477
<p class="answer">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:</p>
481
<p class="answercode">session.save_path = C:\temp</p>
485
<p class="answer">or otherwise in a .htaccess file in your main moodle directory:</p>
489
<p class="answercode">php_value session.save_path "/home/moodle/sessions"</p>
491
<p class="answercode"> </p>
499
<h3><a name="fixdirroot"></a>When I go to the admin page, I get told to make dirroot blank!</h3>
503
<p class="answer">If you see errors like this in Moodle 1.0.9:</p>
511
<table class="generalbox" cellspacing="0" cellpadding="5" align="center" border="0">
523
<td bgcolor=#ffbbbb>Please fix your settings in config.php:
531
<p>$CFG->dirroot = "/home/users/fred/public_html/moodle";
539
<p>$CFG->dirroot = "";</p></td></tr></tbody></table>
547
<p class="answer">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: </p>
551
<p class="answercode">if ($dirroot != $CFG->dirroot) {</p>
555
<p class="answer">and change it to this:</p>
559
<p class="answercode">if (!empty($dirroot) and $dirroot != $CFG->dirroot) {</p>
561
<p class="answercode"> </p>
567
<h3><a name="loginsetting"></a>I login but don't appear to be. I am logged in and can navigate freely.</h3>
571
<p class="answer">Make sure the URL in your $CFG->wwwroot setting is exactly the
573
same as the one you are actually using to access the site.</p>
575
<p class="answer"> </p>
579
<h3><a name="resource1"></a>When trying to add a resource I receive error messages.</h3>
583
<p class="answer">Assuming you are using Apache, then it's quite likely that your
585
setting in config.php for $CFG->wwwroot is different from the actual URL you
587
are using to access the site. Also try turning off "<b>secureforms</b>" in the
591
<p class="answer"> </p>
599
<h3><a name="noadmin"></a>During the initial setting-up process, I never get asked to create an admin account!</h3>
603
<p class="answer">This is a known bug in versions of Moodle up to 1.0.9, now fixed in the main code and version 1.1.</p>
607
<p class="answer">It doesn't affect all people, it only occurs when the person installing Moodle has a
609
cookie in their browser from another program on the same site, called "user", "admin", or "teacher".</p>
613
<p class="answer">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:</p>
617
<p class="answercode">unset($user);<br />unset($admin);<br />unset($teacher);</p>
621
<p class="answer">After performing any of these fixes it might be a good idea
623
to drop all the tables in your database and re-install again from scratch.</p>
625
<p class="answer"> </p>
633
<h3><a name="nologin"></a>I can't log in - I just stay stuck on the login screen.</h3>
637
<p class="answer">The most common cause for this is that your own computer (not your Moodle server)
639
has a firewall that is stripping referrer information from the browser. Here are
641
some instructions for fixing <a href="http://service1.symantec.com/SUPPORT/nip.nsf/46f26a2d6dafb0a788256bc7005c3fa3/b9b47ad7eddd343b88256c6b006a85a8?OpenDocument&src=bar_sch_nam">Norton firewall products</a>.</p>
645
<p class="answer">The server admin can also fix this for everyone by editing the Moodle configuration
647
page and changing the variable "<b>secureforms</b>" to "No".</p>
651
<p class="answer">Another possible cause of this problem is that sessions are
653
not configured properly on the server. You can test this by calling the script
655
http://yourserver/moodle/lib/session-test.php.</p>
657
<p class="answer"> </p>
665
<h3><a name="backup"></a>How do I backup my whole Moodle site?</h3>
669
<p class="answer">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.</p>
673
<p class="answer">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</p>
675
<p class="answercode">cd /my/backup/directory</p>
677
<p class="answercode">mv moodle-database.sql.gz moodle-database-old.sql.gz</p>
679
<p class="answercode">mysqldump -h example.com -u myusername --password=mypassword -C -Q -e -a mydatabasename > moodle-database.sql</p>
681
<p class="answercode">gzip moodle-database.sql</p>
683
<p class="answer">For the files, you can use rsync regularly to copy only the changed files to another host:</p>
685
<p class="answercode">rsync -auvtz --delete -e ssh mysshusername@example.com:/my/server/directory
687
/my/backup/directory/</p>
689
<p class="answercode"> </p>
695
<h3><a name="locale"></a>Why doesn't my Moodle site display the time & date correctly?</h3>
699
<p class="answer">Each language requires a specific language code (called a <strong>locale</strong>
701
code) to allow dates to be displayed correctly. The language packs contain default
703
standard codes, but sometimes these don't work on Windows servers. </p>
705
<p class="answer">You can find the correct locale codes for Windows on these two
707
pages: <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_language_strings.asp" target="_blank">Language
709
codes</a> and <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_country_strings.asp" target="_blank">Country/region
711
codes</a>.(eg "esp_esp" for spanish)</p>
713
<p class="answer">These new locale codes can be entered on the Admin -> Configure
715
-> Variables page, where they override the ones in the currently chosen language
719
<p class="answer"> </p>
721
<h3><a name="cron"></a>Email copies are not being sent
725
<p class="answer">You <strong>must</strong> set up cron properly if you want Moodle
727
to send out automatic email from forums, assignments etc. This same
729
process also performs a number of clean-up tasks such as deleting old unconfirmed
731
users, unenrolling old students and so on.</p>
733
<p class="answer">Basically, you need to set up a process to regularly call the
735
script http://yoursite/admin/cron.php. Please see <a href="./?file=install.html#cron">the
737
section on cron in the Installation documentation</a>.</p>
739
<p class="answer">Tip: Try the default setting in Moodle variables page. Leave the smtphost blank.
741
This will be acceptable for the majority of users.
742
<p class="answer">
743
<p class="answer">
750
<p align="center" class="normaltext"><a href='mailto:ma%72%74in@%6d%6fo%64%6c%65.o%72g' title='martin@moodle.org'>Suggest
754
a new FAQ</a> (include the answer!)</p>
762
<p align="right"><strong><em>Thanks to John Eyre for helping to maintain this
766
FAQ.</em></strong></p>
770
<p align="CENTER"><font size="1"><a href="." target="_top">Moodle Documentation</a></font></p>
774
<p align="CENTER"><font size="1">Version: $Id: faq.html,v 1.6 2003/03/30 13:54:28
778
moodler Exp $</font></p>