https://docs.moodle.org/19/en/api.php?action=feedcontributions&user=Bonbon1986&feedformat=atomMoodleDocs - User contributions [en]2024-03-28T22:14:17ZUser contributionsMediaWiki 1.39.6https://docs.moodle.org/19/en/index.php?title=Installation_FAQ&diff=19366Installation FAQ2007-01-19T07:59:10Z<p>Bonbon1986: </p>
<hr />
<div>{{FAQ}}<br />
<br />
==PHP - is it installed and what version do I have?==<br />
<br />
Make a new file on your web site called ''info.php'', containing the following text, and call it from your browser:<br />
<br />
<?PHP phpinfo() ?><br />
<br />
If nothing happens then you don't have PHP installed. See the installation docs for some information about where to download it for your computer.<br />
<br />
== System information needed for Installation Forum ==<br />
When posting questions to the installation forum, try to provide as much background information as possible about your moodle system. Use this template to help:<br />
<br />
* Server OS name & version: <br />
* Browser name and version:<br />
* Moodle version:<br />
<br />
It is also a good idea to include a copy of your phpinfo browser page to your post. Simply copy and paste into a text document and attach this to your post.<br />
<br />
==Any text I add with an apostrophe (') or a quote (") causes errors or comes up with a slash added==<br />
<br />
Problems caused by apostrophes are caused by incorrect "magic quotes" settings. Moodle requires the following settings in the php.ini file (which are usually the default):<br />
<br />
magic_quotes_gpc = On<br />
magic_quotes_runtime = Off<br />
<br />
Please see [[Installing Moodle]] for more details.<br />
<br />
==Email copies are not being sent from my forums==<br />
<br />
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.<br />
<br />
Basically, you need to set up a process to regularly call the script <code><nowiki>http://yoursite/admin/cron.php</nowiki></code>. Please refer to the [[Cron|cron instructions]].<br />
<br />
'''Tip:''' Try the default setting in Moodle variables page. Leave the smtphost blank. This will be acceptable for the majority of users.<br />
<br />
==Error: database connection failed==<br />
<br />
If you get errors like "database connection failed" or "could not connect to the database you specified", here are some possible reasons and some possible solutions.<br />
<br />
* Your '''database server''' isn't installed or running. To check this for MySQL try typing the following command line<br />
$telnet database_host_name 3306<br />
:You should get a cryptic response which includes the version number of the MySQL server.<br />
* You don't have the '''PHP mysql or postgresql extensions''' installed (please refer to FAQ re. whether PHP is installed).<br />
* You haven't created a '''Moodle database and assigned a user''' with the correct privileges to access it. <br />
* The '''Moodle database settings''' are incorrect. The database name, database user or database user password in your Moodle configuration file ''config.php'' are incorrect. Use phpMyAdmin to set up and check your MySQL installation.<br />
* You are using MySQL version 4.1 or higher, whose '''default password hashing algorithm''' is incompatible with that available in PHP versions 4.x.x. See http://dev.mysql.com/doc/mysql/en/old-client.html for further information on how to deal with this.<br />
* You are using Fedora core 3 or some other Linux system with '''SELinux installed''' and enabled. See the following URL for information on how to disable SELinux: http://fedora.redhat.com/projects/selinux/<br />
* Mac OSX users -- if you are running MySQL on a Mac OSX, try changing '''$CFG->dbhost''' from 'localhost' to '127.0.0.1'<br />
<br />
==I can't log in - I just stay stuck on the login screen==<br />
<br />
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 [http://service1.symantec.com/SUPPORT/nip.nsf/46f26a2d6dafb0a788256bc7005c3fa3/b9b47ad7eddd343b88256c6b006a85a8?OpenDocument&src=bar_sch_nam Norton firewall products].<br />
<br />
The server admin can also fix this for everyone by changing the ''secureforms'' variable to 'No' in the security section of Administration >> Configuration >> [[admin/config|Variables]].<br />
<br />
Another possible cause of this problem is that sessions are not configured properly on the server. You can test this by calling the script <nowiki>http://yourserver/moodle/lib/session-test.php</nowiki>.<br />
<br />
==I keep getting this error: Failed opening required '/web/moodle/lib/setup.php'==<br />
<br />
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.<br />
<br />
Sometimes people only use the path from their home directory, or relative to the root of the web server directory.<br />
<br />
==I login but the login link doesn't change. I am logged in and can navigate freely.==<br />
<br />
Make sure the URL in your <code>$CFG->wwwroot</code> setting is exactly the same as the one you are actually using to access the site.<br />
<br />
==My pages show fatal errors such as : Parse error, call to undefined function: get_string()==<br />
<br />
If you see errors like:<br />
<br />
Parse error: parse error, unexpected T_VARIABLE in /path/to/moodle/config.php on line 94 <br />
Fatal error: Call to undefined function: get_string() in /path/to/moodle/mod/resource/lib.php on line 11<br />
<br />
then you have probably left out a semi-colon or closing quote from a line in ''config.php'' (previous to line 94).<br />
<br />
Another possibility is that you edited ''config.php'' in a program like Word and saved it as a HTML web page, instead of using a plain text editor like Notepad.<br />
<br />
Another thing to check, particularly if you are using 3rd party modules or plugins, is whether any of the php scripts use short open tags (<? ?>) instead of proper ones (<?php ?>). Short tags are bad for various reasons, so first contact the author of that extension to tell them about the problem. Then either replace short tags with conventional ones, or set this line in php.ini:<br />
<br />
short_open_tag = On<br />
<br />
You should never find short tags in core moodle code. If you do, please file a bug in the bug tracker.<br />
<br />
==Serious Error! Could not set up the site!==<br />
<br />
Please refer to the Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=32071 Serious Error! Could not set up the site!].<br />
<br />
==Uploaded files give "File not found"==<br />
<br />
For example: Not Found: The requested URL /moodle/file.php/2/myfile.jpg was not found on this server.<br />
<br />
Your web server needs to be configured to allow the part of the URL after a script name to be passed directly to the script. This is usually enabled in Apache 1, but is usually disabled by default in Apache 2. To turn it on, add this line to your ''httpd.conf'', or to a ''.htaccess'' file in your local directory (see [[Installing Moodle]] for more details):<br />
<br />
'''AcceptPathInfo''' on<br />
<br />
Note, this will ONLY work for Apache versions 2.x.<br />
<br />
If you are not using Apache 2 and you still have this problem (unlikely) then you can switch Moodle to use an alternative method. The disadvantages are a slight loss of performance for your users and you won't be able to use relative links within HTML resources.<br />
<br />
To use this alternative method, you should change the ''slasharguments'' variable in the Operating System section of Administration >> Configuration >> [[admin/config|Variables]]. You should now be able to access your uploaded files.<br />
<br />
==When I go to the admin page, I get told to make dirroot blank!==<br />
<br />
If you see errors like this:<br />
<br />
Please fix your settings in config.php: You have: $CFG->dirroot = "/home/users/fred/public_html/moodle"; <br />
but it should be: $CFG->dirroot = "";<br />
<br />
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'':<br />
<br />
if ($dirroot != $CFG->dirroot) {<br />
<br />
and change it to this:<br />
<br />
if (!empty($dirroot) and $dirroot != $CFG->dirroot) {<br />
<br />
==When trying to add a resource I receive error messages==<br />
<br />
Assuming you are using Apache, then it's quite likely that your setting in ''config.php'' for <code>$CFG->wwwroot</code> is different from the actual URL you are using to access the site. Also try turning off the ''secureforms'' variable in the security section of Administration >> Configuration >> [[admin/config|Variables]].<br />
<br />
==Why are all my pages blank?==<br />
<br />
Check the dirroot variable in ''config.php''. You must use complete, absolute pathnames e.g.<br />
<br />
$CFG->dirroot = "d:\inetpub\sites\www.yoursite.com\web\moodle";<br />
<br />
Another reason might be that PHP has not been configured to support MySQL. This is common on Redhat and OpenBSD installations. In this case, an error is generated, but since error displays are often disabled by default, all that is seen on the browser is a blank screen. To enable PHP error displays, set these lines in your ''php.ini'' file and reload the web page.<br />
<br />
display_errors = On<br />
display_startup_errors = On<br />
<br />
To determine if MySQL support is your problem, insert this as the second line in your ''config.php'' file<br />
<br />
phpinfo();<br />
<br />
then reload the web page. Examine the output closely to see if MySQL is supported. If not look for a package you are missing.<br />
<br />
== Why is a particular page blank or incomplete? ==<br />
<br />
Check your web server log files!!<br />
<br />
If a particular page is blank or incomplete (it doesn't display the footer), before you do anything else check your error logs.<br />
<br />
PHP can be set up to log errors in a variety of different ways. These settings are contained in the php.ini file on the server. If you don't know were that is, edit your Moodle ''config.php'' and add the following as the second line<br />
<br />
phpinfo();<br />
<br />
then reload the web page. Look for the entry '''Configuration File (php.ini) Path'''.<br />
<br />
When you have located php.ini open it in your favorite text editor. Find the '''Error handling and logging''' section of the php.ini file. Make sure that both '''display_errors = On''' and '''log_errors = On''' are present and uncommented. Check the value of '''error_log''' - this tells you the location of the file errors are logged to. If it is commented out then errors will be sent to the web server error log file. Remember, if you make any changes to this file you will need to restart the web server (or just reboot the server).<br />
<br />
Having established that logging is working, reproduce the error. Immediately check the error log file right at the end. Hopefully you will see a PHP error message at or very near the end of the file. This may solve your problem directly or makes it a lot easier to diagnose the problem in the Moodle forums.<br />
<br />
==Why can't I upload a new image into my profile?==<br />
<br />
If you don't see anything on your user profile pages to let you upload user images then it's usually because GD is not enabled on your server. GD is a library that allows image processing.<br />
<br />
1. Make sure GD has been included in your PHP installation. You can check this by going into Administration >> Configuration >> [[Variables]] and looking for the gdversion setting. This setting is chosen automatically every time you visit that page. If it shows GD version 1 or version 2 then everything should be fine. Save that configuration page and go back to your user profile.<br />
<br />
2. If Moodle thinks GD is not installed, then you will need to install it. On Windows this is usually a matter of "turning on" the module in PHP (see the [[Installing AMP|installation instructions]] for help). On Unix you may need to re-compile PHP with arguments something like this:<br />
<br />
./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-gd <br />
--with-jpeg-dir=/usr/local --with-png-dir=/usr --with-ttf --enable-gd-native-ttf <br />
--enable-magic-quotes --with-mysql --enable-sockets --enable-track-vars <br />
--enable-versioning --with-zlib<br />
<br />
3. Remember to re-visit the Moodle configuration page after making any changes to PHP so it can pick up the correct version of GD.<br />
<br />
Please see the Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=44271 Profile pictures] for additional information.<br />
<br />
==Why do I keep getting error messages about "headers already sent"?==<br />
<br />
If you see errors like this:<br />
<br />
Warning: Cannot add header information - headers already sent by (output started at /webs/moodle/config.php:87) <br />
in /webs/moodle/lib/moodlelib.php on line 1322 <br />
Warning: Cannot add header information - headers already sent by (output started at /webs/moodle/config.php:87)<br />
in /webs/moodle/lib/moodlelib.php on line 1323 <br />
Warning: Cannot add header information - headers already sent by (output started at /webs/moodle/config.php:87)<br />
in /webs/moodle/login/index.php on line 54<br />
<br />
you have blank lines or spaces after the final <code>?></code> 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.<br />
<br />
== Why doesn't my Moodle site display the time and date correctly? ==<br />
<br />
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.<br />
<br />
You can find the correct locale codes for Windows on these two pages: [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_language_strings.asp Language codes] and [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_country_strings.asp Country/region] codes (e.g. "esp_esp" for spanish)<br />
<br />
These new locale codes can be entered on the Administration >> Configuration >> [[admin/config|Variables]] page, where they override the ones in the currently chosen language pack.<br />
<br />
==I can't Login with message "Please verify that the current setting of session.save_path is correct" ==<br />
[http://moodle.org/mod/forum/discuss.php?d=55925#254596 See this Using Moodle Forum Summary]<br />
<br />
[[Category:Core]]<br />
[[Category:Administrator]]<br />
[[Category:FAQ]]<br />
[[Category:Installation]]<br />
<br />
[[es:FAQ Instalación]]<br />
[[fr:FAQ d'installation]]<br />
[[nl:Installatie FAQ]]<br />
[[ja:インストールFAQ]]<br />
[[ru:Установка FAQ]]</div>Bonbon1986https://docs.moodle.org/19/en/index.php?title=Installation_Quickstart&diff=19364Installation Quickstart2007-01-19T07:12:47Z<p>Bonbon1986: </p>
<hr />
<div>This guide is designed for administrators who have installed Moodle before and need a quick recap to jog their memory. It could also be useful for those administrators who wish to have an overview of the installation procedure before they start with our [[Installing Moodle| more detailed installation guide]].<br />
<br />
===Preparation===<br />
<br />
* Install PHP and required extensions, a supported database such as MySQL and a webserver on the target computer<br />
* Create a blank database (call it moodle if you like) and create a database user with the appropriate permissions<br />
* Create a data directory (call it moodledata if you wish) outside of the webserver. <br />
* Ensure the webserver is the owner of the data folder and give the owner read, write and execute permissions<br />
* Download Moodle<br />
<br />
===Installation===<br />
<br />
* Extract the files and place them in the documents folder on the webserver (or any webserver subfolder)<br />
* Go to <nowiki>http://yourserver/install.php</nowiki> or <nowiki>http://yourserver/subfolders/install.php</nowiki> to start the installation<br />
* Download the [[Configuration file | config.php]] file from your webserver and place in the moodle root if prompted<br />
<br />
===Configuration===<br />
<br />
* If you agree with the [[License | GPL license]] you will be allowed to continue<br />
* Give your site a name and description<br />
* Configure an admin account<br />
<br />
===One last thing===<br />
Once you have finished setting up moodle you need to set up [[Cron|cron]].<br />
<br />
'''That's it! Well done :-)'''<br />
<br />
==See Also==<br />
<br />
* [[Installing Moodle]] A more detailed installation guide<br />
* [[Installation FAQ]]<br />
<br />
[[Category: Administrator]]<br />
<br />
[[ru:Установка Quickstart]]</div>Bonbon1986https://docs.moodle.org/19/en/index.php?title=Installing_AMP&diff=19344Installing AMP2007-01-18T06:09:31Z<p>Bonbon1986: </p>
<hr />
<div>AMP or AMPPlite stands for '''A'''pache, '''M'''ySQL & '''P'''HP. Moodle is written in a scripting language called [[PHP]] and stores most of its data in a database. The recommended database is [[MySQL]]. Before installing Moodle you must have a working PHP installation and a working database to turn your computer into a functional web server platform. XAMP is a Windows and MAMP is a Mac OS version. <br />
Moodle does have [[Complete install packages]] in the [http://download.moodle.org/ download section] as well as the Moodle only package.<br />
<br />
The AMP individual applications can be tricky to set up for average computer users. This page has been written to try to make this process as simple as possible for different platforms. <br />
<br />
<br />
== Hosting Service ==<br />
<br />
Unfortunately hosting services vary quite a lot in the way they work. Some will even install Moodle for you.<br />
<br />
Most will offer a web-based control panel to control your site, create databases and set up cron. Some may also offer terminal access via ssh, so that you can use the command shell to do things.<br />
<br />
You should work your way through the [[Installing Moodle|Installation guide]] and take each step at a time. Ask your hosting provider if you get stuck.<br />
<br />
<br />
== Mac OS X ==<br />
<br />
The easiest way to do this is use the [[Apache]] server that Apple provides, and add PHP and MySQL using Marc Liyanage's packages. Both of the pages below come with good instructions that we won't duplicate here:<br />
<br />
* '''PHP''': Download from here: http://www.entropy.ch/software/macosx/php/<br />
* '''MySQL''': Download here: http://www.entropy.ch/software/macosx/mysql/<br />
<br />
Once these are installed the standard [[Installing Moodle|Installation guide]] should be fairly straightforward.<br />
<br />
Go here for a [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] (not server) Mac.<br />
<br />
== Red Hat Linux ==<br />
<br />
You should install all available RPM packages for Apache, PHP and MySQL. One package that people frequently forget is the php-mysql package which is necessary for PHP to talk to MySQL.<br />
<br />
Once these are installed the standard [[Installing Moodle|Installation guide]] should be fairly straightforward.<br />
<br />
A more detailed walkthrough is here: [[RedHat Linux installation]]<br />
<br />
== Windows ==<br />
<br />
Installing Moodle '''for the first time''' on a [[Localhost]] (a stand alone computer) is easy and can be a very useful tool even if a web based production Moodle Server is available for use. These instructions work on a Window XP computer.<br />
#In the [http://download.moodle.org/?lang=en Download section], find the second group called "Complete Install Packages (Moodle+Apache+MySQL+PHP)" and choose the version you would like. Click on the download link on the far right, which will download a large zip file.<br />
#Unzip the downloaded file at c: and keep the path structure for all the files. <br />
#Rename the just created c:\moodle to c:\xampplite (c:\xampplite will be our example) but you could rename it c:\moodle16 or c:\moodle17 or C:\testMoodle or whatever .<br />
#Using Windows Explorer run the file c:\xampplite\set_xampp.bat which will make sure all the configuration files use c:\xampplite as the home or root directory.<br />
#The following steps assume that the web server will be able to use port 80 on your computer. See [[Windows_installation_using_XAMPP#Skype |troubleshooting if you are running Skype]] which also likes to use this port as a default. <br />
#There many ways to start the localhost webserver from this point for the Moodle install. Here are two ways.<br />
##Slightly faster<br />
###Using Windows Explorer run the file c:\xampplite\restart_xampp.bat and do not close the window that opens.<br />
##Still fast<br />
###In Windows Explorer click on c:\xampplite\apache_start to start the Apache web server. This opens a new window that you should leave open.<br />
###In Windows Explorer click on c:\xampplite\mysql_start to start the MySQL database server. This opens yet another new window that you should leave open.<br />
#In your favorite Web browser, go to address bar and type "localhost" and press enter or go.<br />
#This will start the Moodle Install process, which the [[Installing Moodle]] [[Installing_Moodle#Go_to_the_admin_page_to_continue_configuration| MoodleDoc page section]] describes in a little bit more detail. This can take some time for a new user. '''Don't panic''', you can change things later and the install process will tell you what you absolutely have to fill in or correct.<br />
<br />
===Easier Moodle restarts===<br />
There are lots of ways to start a Moodle after an install. Most Moodlers will have one or more "localhost" links on their computer installed in "Favorites" or even as a browser's default opening screen. But first a web server has to be started. Here are two ways to start them. <br />
====Automatic Window services startup====<br />
In order to make starting Moodle more convenient in the future you could install the web and database servers as Windows services that are started automatically. To do this go to Start -> Run... and type the command "c:/xampplite/service.exe -install" into Open box. Then click OK.<br />
<br />
Start Moodle by typing localhost in the web browser and/or adding localhost as a favorite site.<br />
====Single button service startups====<br />
Sometimes there are more than one localhost installed on a computer. Create a short cut on the start menu, favorites or desktop that points to each specific file like c:\xampplite\restart_xampp.bat . Lable each shortcut to a localhost differently, for example C_MoodleXampp, or Moodle16 or Moodle17 or whatever. <br />
<br />
Start the Moodle by placing localhost in the web browser or adding it as a favorite site. Which ever localhost you restarted, that is the Moodle your web browser will find.<br />
<br />
==Other install options==<br />
Instead of using this package you can also install XAMPP and Moodle separately as explained on the page [[Windows_installation_using_XAMPP]]. <br />
<br />
As an alternative to the above package you could use a package like EasyPHP that bundles all the software you need into a single Windows application. Note that the EasyPHP 1.8 uses older versions of the software that are too old for Moodle 1.6. Also many menus for EasyPHP are still in French. EasyPHP may be a good option again once its version 2.0 is released.<br />
<br />
Here you can find steps for an [[IIS]]: [[Windows installation]] for XAMPP or Windows 2003 .<br />
<br />
==Testing PHP==<br />
Once you have installed your web server and PHP you should be able to create a file (for example phpinfo.php in the document root) with the following in it:<br />
<br />
<?phpinfo()?><br />
<br />
You should be able to open this file in a web browser by going to to the URL '''localhost/phpinfo''' and see a web page that has PHP status information in it such as [[phpinfo|this]].<br />
<br />
==See also==<br />
<br />
*[[Installing Moodle]]<br />
*[[Installation FAQ]]<br />
*[[Upgrading Moodle]]<br />
*[[Debian GNU/Linux installation]]<br />
*[[Complete install packages]], also includes instructions for creating a stand alone (localhost) installation on a single computer.<br />
<br />
[[Category:Core]]<br />
[[Category:Administrator]]<br />
[[Category:Installation]]<br />
<br />
[[es:Instalación AMP]]<br />
[[ja:AMPのインストール]]<br />
[[ru:Установка AMP]]</div>Bonbon1986