Perguntas Frequentes (FAQ)

Esta página responde algumas das perguntas colocadas com maior frequência por quem instala o Moodle. Se já seguiu todos os passos sugerido no guia de instalação mas ainda tem problemas, então provavelmente este é o lugar certo para si.

Se não encontrar a resposta que procura aqui, tente nos foruns da disciplina Using Moodle em moodle.org (no mesmo sítio temos também foruns em português). Comece por fazer uma pesquisa nos foruns, usando algumas palavras chaves, pois o seu problema pode já ter sido discutido. Se não encontrar nada, tente enviar a sua pergunta para o fórum que achar apropriado - normalmente haverá alguém disposto a ajudá-lo.

Se já tentou várias soluções sem êxito e o seu servidor estiver protegido por uma firewall, poderá ser preciso uma reconfiguração da sua firewall para garantir que não está a bloquear uma função básica ou alguma parte da comunicação. Moodle raramente tem problemas com as firewalls mas por vezes uma má configuração de uma firewall pode reduzir as funcionalidades do Moodle.

Use esta lista para ir directamente à resposta correspondente mais abaixo:

Sempre que tento aceder a um ficheiro que enviei obtenho o erro "File not Found"

Por exemplo: Not Found: The requested URL /moodle/file.php/2/myfile.jpg was not found on this server.

O seu servidor web tem que ser configurado para permitir que a parte do URL que segue o nome de um script seja passada directamente para esse script. Esta configuração está normalmente activada no Apache 1, mas desactivada por omissão no Apache 2. Para activar, acrescente esta linha ao seu ficheiro httpd.config, ou ao ficheiro .htaccess na sua directoria local (ver a Instalação do Moodle para mais informação):

AcceptPathInfo on

Note que isto APENAS funcionará para as versões do Apache 2.x.

Se não estiver a usar o Apache 2, mas ainda encontrar este problema (pouco provável), então pode fazer com que o Moodle use um método alternativo. As desvantagens incluem uma ligeira perda de performance para os seus utilizadores e a impossibilidade de usar ligações relativas em documentos HTML.

Para usar este método alternativo: Faça login como Admin, dirija-se à página "Configurar Variáveis" e muda a opção de configuração para "slasharguments". Agora já deve ser capaz de aceder aos ficheiros enviados.

 

PHP - está instalado e que versão tenho?

Crie um novo ficheiro no seu sítio web chamado info.php, com o conteúdo que se segue, e invoque-o a partir do seu navegador:

<?PHP phpinfo() ?>

Se nada acontecer, então é porque não tem o PHP instalado. Procure nos documentos de instalação mais informação sobre onde pode obter o PHP e como instalá-lo.

 

Porque estão todas as minhas páginas em branco?

Verifique a variável dirroot em config.php. Deve usar caminhos completos e absolutos, por exemplo:

$CFG->dirroot = "d:\inetpub\sites\www.yoursite.com\web\moodle";

 

Para a plataforma Redhat Linux, veja em: Redhat Linux

 

As minhas páginas apresentam erros graves tais como: "call to undefined function: get_string()" (chamada para função não definida: get_string())

Se vir erros como:

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

então é provável que se tenha esquecido de um ponto e vírgula ou de fechar uma aspa numa das linhas do ficheiro config.php (antes da linha 94).

Outra explicação possível é ter usado um editor de texto como o Word para alterar o ficheiro config.php, e o tenha gravado em formato HTML em vez do formato de texto simples.

 

Porque é que estou sempre a receber mensagens sobre "headers already sent" (cabeçalhos já enviados)?

Se vir erros como este:

Warning: Cannot add header information - headers already sent by (output started at /webs/moodle/config.php:87) /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

Significa que tem espaços ou linhas em branco antes do ?> final no ficheiro config.php. Por vezes alguns editores de texto acrescentam espaços - por exemplo o Notepad em Windows - por isso talvez tenha que usar outro editor para remover completamente as linhas ou espaços em branco.

 

Aparece-me sempre este erro: "Failed opening required '/web/moodle/lib/setup.php'" (Ocorreu uma falha ao abrir o ficheiro '/web/moodle/lib/setup.php')

No seu ficheiro config.php, o valor usado para a variável dirroot deverá ser o caminho completo a partir do directório raíz no seu disco.

Por vezes as pessoas usam apenas o caminho a partir do seu directório de trabalho o relativo ao directório raíz do servidor Web.

 

Any text I add with an apostrophe (') or a quote (") causes errors or comes up with a slash added

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.

 

I keep getting error messages about session_start

If you see errors like this:

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 (in a directory called /tmp). Usually the reason is that you don't HAVE a directory called /tmp on your computer. This is usually the case with Windows installations.

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"

 

When I go to the admin page, I get told to make dirroot blank!

If you see errors like this in Moodle 1.0.9:

Please fix your settings in config.php:

You have:

$CFG->dirroot = "/home/users/fred/public_html/moodle";

but it should be:

$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) {

and change it to this:

if (!empty($dirroot) and $dirroot != $CFG->dirroot) {

 

I login but don't appear to be. I am logged in and can navigate freely.

Make sure the URL in your $CFG->wwwroot setting is exactly the same as the one you are actually using to access the site.

 

When trying to add a resource I receive error messages.

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.

 

During the initial setting-up process, I never get asked to create an admin account!

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.

 

I can't log in - I just stay stuck on the login screen.

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.

 

How do I backup my whole Moodle site?

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/

 

Why doesn't my Moodle site display the time & date correctly?

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.

 

Email copies are not being sent from my forums

You must set up cron properly if you want Moodle to send out automatic email from forums, journals, 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.

Moodle Documentation

Version: $Id: faq.html,v 1.6 2003/03/30 13:54:28 moodler Exp $