<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/test/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hccrle</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/test/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hccrle"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/Special:Contributions/Hccrle"/>
	<updated>2026-10-06T04:57:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=48414</id>
		<title>Installation FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=48414"/>
		<updated>2008-12-21T23:06:36Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: Added references to forum posts on increasing max. upload size&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==PHP - is it installed and what version do I have?==&lt;br /&gt;
&lt;br /&gt;
Make a new file on your web site called &#039;&#039;info.php&#039;&#039;, containing the following text, and call it from your browser:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?PHP phpinfo() ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If nothing happens then you don&#039;t have PHP installed or your webserver is not configured to handle .php files properly. See the installation docs for some information about where to download it for your computer. See the [[phpinfo]] page for details about the content of this page.&lt;br /&gt;
&lt;br /&gt;
== System information needed for Installation problems forum ==&lt;br /&gt;
When posting questions to the [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum], try to provide as much background information as possible about your moodle system. Use this template to copy and paste into your post:&lt;br /&gt;
* Server Operating System name (version also if possible): &lt;br /&gt;
* Browser name (version also if possible):&lt;br /&gt;
* Moodle version:&lt;br /&gt;
* Moodle install type? (New/Upgrade):&lt;br /&gt;
* Moodle config.php attached?(Y/N):&lt;br /&gt;
* Phpinfo attached? (Y/N):&lt;br /&gt;
&lt;br /&gt;
For the last two items, try to include the following in your post as an attachment:&lt;br /&gt;
* A copy of your phpinfo output as shown in your browser (see the instructions above for an explanation of how to obtain this, or see [[phpinfo]]).&lt;br /&gt;
* A copy of the Moodle configuration file (with secret info like database password deleted, of course). This is located in the main Moodle directory (by default called moodle), and is named config.php&lt;br /&gt;
&lt;br /&gt;
Copy and paste both of these into a single text file (using vi, Notepad, etc) and attach this to your post. If your PC is a Windows box and config.php looks messy (line breaks missing or in the wrong places) in Notepad, try Wordpad.&lt;br /&gt;
&lt;br /&gt;
If you cannot provide your phpinfo, try to copy &amp;amp; paste and complete these in your post:&lt;br /&gt;
* Webserver (e.g. Apache/IIS) version:&lt;br /&gt;
* Database server (e.g. MySQL, PostgreSQL) version:&lt;br /&gt;
* PHP version:&lt;br /&gt;
&lt;br /&gt;
For installation on web hosting accounts: contact your support desk who should be able to tell you this information.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Security Warning&#039;&#039;&#039;: Make sure you edit any files and delete any passwords before posting onto the forum.&lt;br /&gt;
&lt;br /&gt;
==What &amp;amp; where are Moodle&#039;s configuration settings stored?==&lt;br /&gt;
Configuration settings are stored in the config.php file stored in your moodle folder. This file is created during the installation process. If there is a problem and the installation cannot create the file, you can try creating it manually from the [[Configuration file]] docs. Please remember that manually editing the file is not recommended and may lead to blank pages, especially if there are additional spaces and/or lines after the final php closing tag &amp;quot;?&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Downloading previous releases of Moodle==&lt;br /&gt;
* &#039;&#039;&#039;Generic Packages&#039;&#039;&#039;: If your server does not meet the [[Installing_Moodle#Requirements | requirements]] for the current version of Moodle, you can download previous releases by using wget, lynx or curl with this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
:For example: to download Moodle version 1.5, use http://download.moodle.org/stable15. You&#039;ll see a directory tree with the files displayed. Click on the one you want and download as normal - if you require the latest update of the version, scroll to the end of the list and download the &amp;quot;moodle-latest&amp;quot; file, or alternatively use these URLs for zip or tgz downloads:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].tgz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Changes made in the version in the last month are listed in the &amp;quot;CHANGES&amp;quot; file in the directory listing. The files you download contain Moodle code and are not the Windows or Mac packages - so you need to have a webserver, a database server and PHP already installed. The earliest version available is Moodle 1.3.&lt;br /&gt;
* &#039;&#039;&#039;Windows Packages&#039;&#039;&#039;: To download previous releases of the Moodle packages for Windows, use this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/windows/MoodleWindowsInstaller-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Mac Packages&#039;&#039;&#039;: To download previous releases of the Mac pacakges, use either of these URLs (depending on whether you need the Intel or PPC package):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-Intel-[version_number].dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-PPC-[version_number}.dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Using CVS&#039;&#039;&#039;: You can also use CVS to download older releases and incremental releases of the Moodle generic packages, e.g. Moodle 1.5.4 - see the [[CVS_for_Administrators | CVS documentation]].&lt;br /&gt;
&lt;br /&gt;
== How to enable and check PHP error logs==&lt;br /&gt;
PHP can be set up to log errors in a variety of different ways: two of these involve the use of the php.ini file and the ini_set command. &lt;br /&gt;
* &#039;&#039;&#039;Using the php.ini file&#039;&#039;&#039;: The log settings are contained in the php.ini file stored on the server. If you don&#039;t know where that is, edit your Moodle &#039;&#039;config.php&#039;&#039; and add the following as the second line&lt;br /&gt;
&lt;br /&gt;
  phpinfo();&lt;br /&gt;
&lt;br /&gt;
:then reload the web page. Look for the entry &#039;&#039;&#039;Configuration File (php.ini) Path&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:When you have located php.ini open it in your favorite text editor. Find the &#039;&#039;&#039;Error handling and logging&#039;&#039;&#039; section of the php.ini file. Make sure that both &#039;&#039;&#039;display_errors = On&#039;&#039;&#039;, &#039;&#039;&#039;display_startup_errors = On&#039;&#039;&#039; and &#039;&#039;&#039;log_errors = On&#039;&#039;&#039; are present and uncommented. Check the value of &#039;&#039;&#039;error_log&#039;&#039;&#039; - 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).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Using ini_set commands&#039;&#039;&#039;: If you are using Moodle 1.7 or higher, the previous steps are not enough. In those versions error logging parameters are dependant on certain administrative settings that you specify in the debugging section. The problem is that if you can&#039;t access the administrative pages, you can&#039;t set the debugging options. So the only way to modify them is by adding the following lines to your config.php file, just before the last line (the one containing a single&#039;?&amp;gt;&#039; only):&lt;br /&gt;
&lt;br /&gt;
  ini_set (&#039;display_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;log_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;display_startup_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;error_reporting&#039;, E_ALL);&lt;br /&gt;
  $CFG-&amp;gt;debug = DEBUG_ALL;&lt;br /&gt;
&lt;br /&gt;
:This will enable the same settings specified above even if Moodle sets them otherwise. &lt;br /&gt;
:&#039;&#039;&#039;Important&#039;&#039;&#039;: Remember to put them just before the last line of config.php.&lt;br /&gt;
&lt;br /&gt;
==Email copies are not being sent from my forums==&lt;br /&gt;
&lt;br /&gt;
You &#039;&#039;must&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
Basically, you need to set up a process to regularly call the script &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://yoursite/admin/cron.php&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Please refer to the [[Cron|cron instructions]].&lt;br /&gt;
&lt;br /&gt;
Tips:&lt;br /&gt;
* Try the default settings in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039;. This generally works.&lt;br /&gt;
*Make sure that &#039;&#039;allowuseremailcharset&#039;&#039; in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039; is set to No. Setting this to Yes can cause a problem in some versions of Moodle.&lt;br /&gt;
&lt;br /&gt;
==I can&#039;t log in - I just stay stuck on the login screen==&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;src=bar_sch_nam Norton firewall products].&lt;br /&gt;
&lt;br /&gt;
Another possible cause of this problem is that sessions are not configured properly on the server. You can test this by calling the script &amp;lt;nowiki&amp;gt;http://yourserver/moodle/lib/session-test.php&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are still having problems, read the [[Can_not_log_in | Cannot log in]] page.&lt;br /&gt;
&lt;br /&gt;
==I log in but the login link doesn&#039;t change. I am logged in and can navigate freely.==&lt;br /&gt;
&lt;br /&gt;
Make sure the URL in your &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; setting is exactly the same as the one you are actually using to access the site.&lt;br /&gt;
&lt;br /&gt;
==Uploaded files give &amp;quot;File not found&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
For example: Not Found: The requested URL /moodle/file.php/2/myfile.jpg was not found on this server.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;httpd.conf&#039;&#039;, or to a &#039;&#039;.htaccess&#039;&#039; file in your local directory (see [[Installing Moodle]] for more details):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
Note, this will ONLY work for Apache versions 2.x.&lt;br /&gt;
&lt;br /&gt;
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&#039;t be able to use relative links within HTML resources.&lt;br /&gt;
&lt;br /&gt;
To use this alternative method, you should change the &#039;&#039;slasharguments&#039;&#039; variable. For moodle versions &amp;lt; 1.7, this is located in the Operating System section of &#039;&#039;Administration &amp;gt; Configuration &amp;gt; [[admin/config|Variables]]&#039;&#039;. In later versions, this option is located in &#039;&#039;Site Administration &amp;gt; Server &amp;gt; HTTP&#039;&#039;. You should now be able to access your uploaded files.&lt;br /&gt;
&lt;br /&gt;
==Why are all my pages blank?==&lt;br /&gt;
&lt;br /&gt;
Check the dirroot variable in &#039;&#039;config.php&#039;&#039;. You must use complete, absolute pathnames e.g.&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dirroot = &amp;quot;d:\inetpub\sites\www.yoursite.com\web\moodle&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
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 see [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | How to enable and check PHP error logs]].&lt;br /&gt;
&lt;br /&gt;
To determine if MySQL support is your problem, insert this as the second line in your &#039;&#039;config.php&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
 phpinfo();&lt;br /&gt;
&lt;br /&gt;
then reload the web page. Examine the output closely to see if MySQL is supported. If not look for a package you are missing.&lt;br /&gt;
&lt;br /&gt;
== Why is a particular page blank or incomplete? ==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your web server log files!!&#039;&#039;&#039; &lt;br /&gt;
:If a particular page is blank or incomplete (it doesn&#039;t display the footer), before you do anything else [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | check your error logs]]. Having established that PHP error 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.&lt;br /&gt;
&lt;br /&gt;
*If you are &#039;&#039;&#039;upgrading to a new version of Moodle&#039;&#039;&#039;, check that you do not have an old version of a non-standard block or module installed. Remove any such blocks or modules installed using the admin settings page and start the install process again. However, do also make sure that you have included all optional plugins that were required by your courses. &lt;br /&gt;
&lt;br /&gt;
*If you &#039;&#039;&#039;do not see any blocks listed&#039;&#039;&#039;, turn editing on and remove any blocks that you have added to that page and try reloading.&lt;br /&gt;
&lt;br /&gt;
*You may get this error immediately after &#039;&#039;&#039;selecting a language&#039;&#039;&#039;. At this stage of the installation process your Moodle computer may need to connect to the Internet and download a language pack, so check that the computer can access the Internet by using a browser. Check also that your PHP settings are as given in the Moodle [[Installing_Moodle#Requirements | Moodle Requirements]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=97734 PHP configuration error] forum discussion  &lt;br /&gt;
&lt;br /&gt;
==Installation hangs when setting-up database tables==&lt;br /&gt;
Sometimes the installation will hang when setting up tables. This will be an abrupt hang with half the page displayed in the browser and/or other outputs removed. Examples are:&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Truncated MySQL statements&#039;&#039;&#039;:&lt;br /&gt;
 &lt;br /&gt;
 (mysql): SET NAMES &#039;utf8&#039;&lt;br /&gt;
 --------------------------------------------------------------------------------&lt;br /&gt;
 (mysql): SHOW LOCAL VARIABLES LIKE &#039;character_set_database&#039;&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 (no more statements are displayed)   &lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Missing Continue button&#039;&#039;&#039;: The “Scroll to continue” link is displayed but no “Continue” button is there. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: There is an exception to this when upgrading an existing database and the installation may appear to hang at the roles generation phase. This process can take a very long time - so please be patient.&lt;br /&gt;
&lt;br /&gt;
Below are some solutions you can try to overcome this problem:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check for MySQL limits&#039;&#039;&#039;. This is often a MySQL error and not a php error. Check that there is no limit placed on your mysql database, e.g. a &amp;quot;questions&amp;quot; limit. See [http://dev.mysql.com/doc/refman/5.0/en/user-resources.html Limiting Account Resources in the MySQL manual].&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your .htaccess files&#039;&#039;&#039;. If the install is on a webhost, adding the following line to the .htaccess file in the Moodle directory has been known to solve the problem.&lt;br /&gt;
 AddType x-mapp-php5 .php&lt;br /&gt;
&lt;br /&gt;
:Try also renaming the .htaccess file so that it is disabled.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Code customizations&#039;&#039;&#039;. You may also want to look and see if you&#039;ve customized any of your code.  Look at the last successful table, and then look at the block, mod, or other code that is referenced by that table.  For example, if your install hangs and continues to say that the forum tables were successful as the last message, look at /mod/forum/ for any custom code.  If you have customized code, backup those files and replace with the correct files.  You can then restart the install by renaming config.php or reinstalling your database from the backup.  If your install is successful, you can make your code changes back into the stock Moodle code.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your memory limit&#039;&#039;&#039;. It may also be that the &amp;quot;memory_limit&amp;quot; in your php.ini is set too low. Please check your php.ini file and allocate the recommended amount (see [https://docs.moodle.org/en/Installing_Moodle#Requirements Moodle requirements]). For Moodle version 1.8 and above at least 40MB is  recommended.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Upgrade incrementally&#039;&#039;&#039;. To avoid this problem when upgrading, it is recommended to upgrade via each version of Moodle, for example 1.7 -&amp;gt; 1.8 -&amp;gt; 1.9 (with the exception of upgrading from 1.5 or 1.6, when it is recommended that 1.7 be skipped, in other words upgrade 1.5 -&amp;gt; 1.6 -&amp;gt; 1.8 -&amp;gt; 1.9).&lt;br /&gt;
&lt;br /&gt;
A work-around to this problem is to setup a working Moodle system on your local PC or server using the [http://download.moodle.org Moodle Packages]. Once you have a running Moodle, [https://docs.moodle.org/en/Upgrading_Moodle#Backup_important_data backup the database] and import to your webhost. Then backup the Moodle code itself (the &amp;quot;moodle&amp;quot; directory on your PC) and copy this to your webhost using (for example) FTP. Finally, edit the moodle/config.php file for the new settings that have to be changed for the webhost.&lt;br /&gt;
&lt;br /&gt;
Some Moodlers have found the suggestion in http://moodle.org/mod/forum/discuss.php?d=65786#p297433 helpful, for some unknown reason. It claims that it is because the fopen function in the line (now line 426 instead of 406) was not being given a string as the first argument, but that&#039;s not true. It was a string; after the edit it is a string whose first and last characters are single quote marks. The amazing thing is that it works at all after that edit. What&#039;s even more amazing is that it fixes the problem, at least for some users. Go figure.&lt;br /&gt;
&lt;br /&gt;
==Why can&#039;t I upload a new image into my profile?==&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see anything on your user profile pages to let you upload user images then it&#039;s usually because GD is not enabled on your server. GD is a library that allows image processing.&lt;br /&gt;
&lt;br /&gt;
1. Make sure &#039;&#039;&#039;GD has been included in your PHP installation&#039;&#039;&#039;. You can check this by going into Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[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.&lt;br /&gt;
&lt;br /&gt;
2. If Moodle thinks GD is not installed, then you will need to &#039;&#039;&#039;install the GD library&#039;&#039;&#039;. &lt;br /&gt;
*On Unix you may need to re-compile PHP with arguments something like this:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-gd &lt;br /&gt;
 --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-ttf --enable-gd-native-ttf &lt;br /&gt;
 --enable-magic-quotes --with-mysql --enable-sockets --enable-track-vars &lt;br /&gt;
 --enable-versioning --with-zlib&lt;br /&gt;
&lt;br /&gt;
* On Windows this is usually a matter of &amp;quot;turning on&amp;quot; the extension in PHP by editing your php.ini file. To do this remove the semicolon for the php_gd2.dll extension - check that this file is actually present in your php extensions  folder first (search your php.ini for extension_dir to determine where this points to on your hard disk). You should then have a line that looks like this:&lt;br /&gt;
 extension=php_gd2.dll&lt;br /&gt;
&lt;br /&gt;
:Windows users should see the [[Installing AMP|installation instructions]] for further help. &lt;br /&gt;
&lt;br /&gt;
3. Remember to &#039;&#039;&#039;restart your webserver&#039;&#039;&#039; (if possible) and re-visit the Moodle configuration page after making any changes to PHP so it can pick up the correct version of GD.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=44271 Profile pictures] for additional information.&lt;br /&gt;
&lt;br /&gt;
== Why doesn&#039;t my Moodle site display the time and date correctly? ==&lt;br /&gt;
&lt;br /&gt;
Each language requires a specific language code (called a &#039;&#039;&#039;locale&#039;&#039;&#039; code) to allow dates to be displayed correctly. The language packs contain default standard codes, but sometimes these don&#039;t work on Windows servers.&lt;br /&gt;
&lt;br /&gt;
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. &amp;quot;esp_esp&amp;quot; for spanish)&lt;br /&gt;
&lt;br /&gt;
These new locale codes can be entered on the Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]] page, where they override the ones in the currently chosen language pack.&lt;br /&gt;
&lt;br /&gt;
==How do I uninstall Moodle?==&lt;br /&gt;
&#039;&#039;&#039;Moodle package installation&#039;&#039;&#039;: If you have downloaded a Moodle package, simply uninstall using your system commands. On Windows PCs, you should access the Control Panel -&amp;gt; Add/Remove Programs. Select the package name and click Change or Remove Programs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Webhost/manual installation&#039;&#039;&#039;: If you have installed Moodle manually or have installed onto a webhost, follow these steps:&lt;br /&gt;
*Delete the moodle database using this mysql command (or delete using your mysql client, e.g. PHPMyAdmin):&lt;br /&gt;
&amp;lt;pre&amp;gt;sql&amp;gt;DROP DATABASE moodle;&amp;lt;/pre&amp;gt;&lt;br /&gt;
:In the above example replace &#039;moodle&#039; with the name of the moodle database you created when installing.&lt;br /&gt;
*Delete the moodledata directory. If you, or your users, have uploaded materials into this directory take a copy of these before deleting this directory.&lt;br /&gt;
*Delete the moodle directory itself. This will delete all of the moodle PHP script files.&lt;br /&gt;
&lt;br /&gt;
==How do I upgrade Moodle? Do I just overwrite the files?==&lt;br /&gt;
Do not overwrite files, it may cause strange errors. You should read the [[Upgrade]] documentation before proceeding.&lt;br /&gt;
&lt;br /&gt;
==I obtain the message &amp;quot;Upgrade already running in this session, please wait!&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
Most likely you refreshed the page before the completion message. If you are absolutely sure that there are no upgrade processes active (php and/or mysql), you can click on &amp;quot;!!!&amp;quot; and restart the upgrade.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note&#039;&#039;: If you click on &amp;quot;&#039;!!!&amp;quot; or try to restart the upgrade from another browser, there is a chance that your data in the database could be corrupted. If this happens, you will need to restore the database from sql dump and then restart the upgrade and wait - the process can take several hours on large sites.&lt;br /&gt;
&lt;br /&gt;
==Migrating Moodle to a new site or server==&lt;br /&gt;
Migrating Moodle means that you have to move the current installation to a new server, and so may have to change IP addresses or DNS entries. To do this you will need to change the $CFG-&amp;gt;wwwroot value in the config.php on the new server. You will also have to change any absolute links stored in the database backup file (before restoring the file on the new server) either using the admin/replace.php script, your text editor or another &amp;quot;search and replace&amp;quot; tool, e.g. sed. For more details see the [[Moodle_migration | Moodle Migration]] page.&lt;br /&gt;
&lt;br /&gt;
==Why does my new installation display correctly on the server, but when I view it from a different machine, styles and images are missing?==&lt;br /&gt;
In the installation instructions, one of the suggested settings for &#039;webroot&#039; is &#039;localhost&#039;. This is fine if all you want to do is some local testing of your new Moodle installation. If, however, you want to view your new installation from another machine on the same local area network, or view your site on the internet, you will have to change this setting:&lt;br /&gt;
*For local testing, &#039;localhost&#039; is fine for the webroot ($CFG-&amp;gt;wwwroot in config.php). &lt;br /&gt;
*If you want to test your site from other machines on the same local area network (LAN), then you will have to use the private ip address of the serving machine, (e.g. 192.168.1.2/moodle) or the network name of the serving computer (e.g. network_name_of_serving_machine/moodle) as the web root. Depending on your LAN setup, it may be better to use the network name of the computer rather than its (private) ip address, because the ip address can and will change from time to time. If you don&#039;t want to use the network name, then you will have to speak to your network administrator and have them assign a permanent ip address to the serving machine.&lt;br /&gt;
*Finally, if you want to test your new installation across the internet, you will have to use either a domain name or a permanent (public) ip address/moodle as your web root. To handle both types of access, see [https://docs.moodle.org/en/masquerading masquerading].&lt;br /&gt;
&lt;br /&gt;
==Maximum upload file size - how to change it?==&lt;br /&gt;
There are several places to change the maximum file upload size. The first place to check is the Administration block.   Security -&amp;gt; Site Policies -&amp;gt; and look for &amp;quot;Maximum Uploaded File Size&amp;quot;.  This is the &amp;quot;maxbyte&amp;quot; variable found in older versions of Moodle (under Admin &amp;gt; Variables). Teachers may also set the maximum file size by the [[Course_settings#Maximum_upload_size|course administration block]].&lt;br /&gt;
&lt;br /&gt;
The second place to check are the server files.  The php.ini file has a limit which will override any other setting. (Hint: remember to restart your server for changes to take effect).  For more help see:&lt;br /&gt;
*[[Administration_FAQ#How_do_the_limits_on_uploaded_files_work.3F]]&lt;br /&gt;
*[[Installing_Moodle#Recheck_PHP_settings]]&lt;br /&gt;
*[[Installing_Moodle#Using_a_.htaccess_file_for_webserver_and_PHP_settings]]&lt;br /&gt;
*[[Site_policies#Maximum_uploaded_file_size]]&lt;br /&gt;
*These forum posts: http://moodle.org/mod/forum/discuss.php?d=63840#287960 and http://moodle.org/mod/forum/discuss.php?d=93882#p414650&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How do I install Moodle on Windows Vista?==&lt;br /&gt;
&lt;br /&gt;
See [[Installing Moodle on Windows Vista]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Errors FAQ]]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:FAQ Instalación]]&lt;br /&gt;
[[fr:FAQ d&#039;installation]]&lt;br /&gt;
[[nl:Installatie FAQ]]&lt;br /&gt;
[[ja:インストールFAQ]]&lt;br /&gt;
[[ru:Установка FAQ]]&lt;br /&gt;
[[pl:Instalacja FAQ]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Site_policies&amp;diff=48384</id>
		<title>Talk:Site policies</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Site_policies&amp;diff=48384"/>
		<updated>2008-12-19T20:14:15Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* on section 14, Password policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== on section 14, Password policy ==&lt;br /&gt;
&lt;br /&gt;
Does anyone know what the deal is on non-alphanumeric characters in passwords? According to one Moodler (DS), he couldn&#039;t get Moodle to connect to his database until he used a database p/w with &#039;&#039;&#039;no&#039;&#039;&#039; non-alphanumeric characters (see http://moodle.org/mod/forum/discuss.php?d=112511#p495044). Is this intentional? Why?&lt;br /&gt;
&lt;br /&gt;
[[User:Richard Enison|Richard Enison]] 14:10, 19 December 2008 (CST)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Site_policies&amp;diff=48383</id>
		<title>Talk:Site policies</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Site_policies&amp;diff=48383"/>
		<updated>2008-12-19T20:10:44Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: Comment on Password policy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== on section 14, Password policy ==&lt;br /&gt;
&lt;br /&gt;
Does anyone know what the deal is on non-alphanumeric characters in passwords? According to one Moodler (DS), he couldn&#039;t get Moodle to connect to his database until he used a database p/w with &#039;&#039;&#039;no&#039;&#039;&#039; non-alphanumeric characters. Is this intentional? Why?&lt;br /&gt;
&lt;br /&gt;
[[User:Richard Enison|Richard Enison]] 14:10, 19 December 2008 (CST)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=47878</id>
		<title>Installing Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=47878"/>
		<updated>2008-12-08T22:59:49Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: Requirements/Software corrected spelling of a PHP extension&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Firstly, don&#039;t panic! :-)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This guide explains how to install Moodle for the first time. For some of these steps it goes into a lot of detail to try and cover the majority of possible web server setups, so this page may look long and complicated. Don&#039;t panic, once you know how to do it you can install Moodle in minutes!&lt;br /&gt;
&lt;br /&gt;
If you have problems please read this page carefully - most common issues are answered in here. If you still have trouble, you can seek help from the Moodle community via  [http://moodle.org/course/view.php?id=5 moodle.org Using Moodle].&lt;br /&gt;
&lt;br /&gt;
Another option is to contact a [http://moodle.com/hosting/ Moodle Partner providing Moodle hosting] who can completely maintain Moodle for you, so that you can ignore all this and get straight into educating! A Moodle partner is the preferred option but if you decide to choose a hosting company that has cpanel then [http://ic.eflclasses.org/tutorials/settingupmoodleonhostingwitholdcpanel.swf this tutorial will guide you]  through the process of choosing a host and setting up moodle via the old cpanel. If you have the new cpanel please use this link [http://ic.eflclasses.org/tutorials/settingupmoodleoncpanel.swf this tutorial will guide you].  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; some hosting companies offer one-click moodle install options such as fantastico, which whilst sometimes effective, usually use old (sometimes years old) versions of moodle and sometimes simply don&#039;t work. If one of these goes wrong, your best bet is often to start from scratch following the instructions here yourself. Its almost certainly quicker.&lt;br /&gt;
&lt;br /&gt;
If you want to run Moodle on your own computer and this page looks a bit daunting, then please see our guides on how to install one of Moodle&#039;s complete [[Complete install packages for Windows|Windows packages]], [[Complete Install Packages for Mac OS X|Mac OS packages]] or [[Installing AMP |Installing Apache, MySQL and PHP(AMP)]]. They provide alternative instructions to install all this on most popular platforms.&lt;br /&gt;
&lt;br /&gt;
==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
Moodle is primarily developed in Linux using [[Apache]], [[MySQL]] and [[PHP]] (also sometimes known as the LAMP platform), but is also regularly tested with Windows XP/2000/2003 (WAMP), Solaris 10 (Sparc and x64), Mac OS X and Netware 6 operating systems. Support for PostgreSQL, Oracle and Microsoft SQL Server is also available.&lt;br /&gt;
&lt;br /&gt;
The procedure for installing Moodle on the Windows platform (e.g. Windows Server, IIS and MSSQL) varies slightly to the procedure for the LAMP platform. See [[Installation for Windows 2003 with IIS]] for more details.&lt;br /&gt;
&lt;br /&gt;
[[Installing Moodle on Windows Vista]] might help with &#039;&#039;&#039;Blank page problem while installing Moodle on Windows Vista&#039;&#039;&#039; .&lt;br /&gt;
&lt;br /&gt;
The requirements for Moodle are as follows:&lt;br /&gt;
&lt;br /&gt;
===Hardware === &lt;br /&gt;
* Disk space: 160MB free (min). You will require more free space to store your teaching materials.&lt;br /&gt;
* Memory: 256MB (min), 1GB (recommended). The general rule of thumb is that Moodle can support 50 &#039;&#039;concurrent&#039;&#039; users for every 1GB of RAM, but this will vary depending on your specific hardware and software combination. &lt;br /&gt;
** &#039;&#039;&#039;Note if you are using a hosted account:&#039;&#039;&#039; Most hosted accounts on commercial sites will meet Disk and Memory requirements. However, you should contact your web host&#039;s support desk to check that this is the case before signing-up with them. It is especially important to &#039;&#039;&#039;ask about any PHP memory limits or MySQL question limits&#039;&#039;&#039;. If your prospective host does not provide a service which meets these requirements, or you are already signed up with them, ask them why and consider taking your business elsewhere if they do not change.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
* Web server software. Most people use [[Apache]], but Moodle should work fine under any web server that supports [[PHP]], such as [[IIS]] on Windows platforms. PHP does impose requirements on versions of web servers, however these are complex and the general advice is to use the newest version possible of your chosen web server. &lt;br /&gt;
* PHP scripting language. (Please note that there have been issues installing Moodle with [http://www.php-accelerator.co.uk PHP-Accelerator]). There are currently two versions (or branches) of PHP available: PHP4 and PHP5 and the version requirements are listed below.&lt;br /&gt;
** For Moodle version 1.4 or later: PHP4 (version 4.1.0 or later) or PHP5 (version 5.1.0 or later) are supported.&lt;br /&gt;
** For Moodle version 1.6 or later: the PHP4 (version 4.3.0 or later) or PHP5 (version 5.1.0 or later) are supported. &lt;br /&gt;
** Future Moodle versions 2.0 or later will not support PHP4 and will require PHP5 (version 5.2.4 or later).&lt;br /&gt;
** PHP Settings. Check these settings in your php.ini or .htaccess file (if you&#039;re using Apache). For settings which use ON/OFF as their values, you can substitute 1 for ON and 0 for OFF if you prefer. &lt;br /&gt;
*** &#039;&#039;safe_mode&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;memory_limit&#039;&#039; should be at least 16M (32M is recommended for Moodle 1.7 and 40M for Moodle 1.8 or later). Large sites may need more than 128M. PHP 5.2.x requires higher memory_limit values than previous versions of PHP. 64bit operating systems require even more memory.&lt;br /&gt;
*** &#039;&#039;session.save_handler&#039;&#039; needs to be set to FILES.&lt;br /&gt;
*** &#039;&#039;magic_quotes_gpc&#039;&#039; should be ON. (It will be recommended to turn it off in 2.0.)&lt;br /&gt;
*** &#039;&#039;magic_quotes_runtime&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;file_uploads&#039;&#039; needs to be ON.&lt;br /&gt;
*** &#039;&#039;session.auto_start&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;session.bug_compat_warn&#039;&#039; needs to be OFF.&lt;br /&gt;
** PHP Extensions and libraries&lt;br /&gt;
*** The mbstring extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** The iconv extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** [http://www.libgd.org/ GD library] and the [http://www.freetype.org/ FreeType 2] library and extensions are needed to be able to look at the dynamic graphs that the logs pages make. (Freetype support is available as part of the GD extension for the 5.x versions of PHP)&lt;br /&gt;
*** The mysql extension is required if you are using the MySQL database. Note that in some Linux distributions (notably Red Hat) this is an optional installation.&lt;br /&gt;
*** The pgsql extension is required if you are using the PostgreSQL database.&lt;br /&gt;
*** The pdo and pdo_sqlite extensions are required for the (experimental) SQLite 3 database support.&lt;br /&gt;
*** The curl extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The tokenizer extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The curl and openssl extensions are required for the Moodle network functionality (Moodle 1.8 or later).&lt;br /&gt;
*** The xmlrpc extension is required for the Moodle network functionality (Moodle 1.8 or later).&lt;br /&gt;
*** The ctype extension is recommended for Moodle 1.8 or later. &lt;br /&gt;
*** Other PHP extensions may be required to support optional Moodle functionality, especially external authentication and/or enrolment (e.g. LDAP extension for LDAP authentication and the sockets extension for Chat server).&lt;br /&gt;
* A working database server: [[MySQL]] or [[PostgreSQL]] are completely supported and recommended for use with any version of Moodle. Support for Microsoft SQL Server and Oracle has been added in Moodle 1.7. MySQL is &#039;&#039;the&#039;&#039; choice for many people because it is very popular, but there are some [[Arguments in favour of PostgreSQL|arguments in favour of PostgreSQL]], especially if you are planning a large deployment.&lt;br /&gt;
** For Moodle 1.5, MySQL (version 3.23 or later) or PostgreSQL (7.4 or later). &lt;br /&gt;
** For Moodle 1.6, MySQL (version 4.1.12 or later) or PostgreSQL (7.4 or later).&lt;br /&gt;
** For Moodle 1.7, MySQL (version 4.1.12 or later), PostgreSQL (7.4 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
** For Moodle 1.8 or later, MySQL (version 4.1.12 or later), PostgreSQL (8.0 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
: MySQL Notes: For Moodle 1.6 or later, If you use latin languages only you can use MySQL 4.1.12. If you are using non-latin languages you require MySQL 4.1.16 or later. Currently the MySQL setting &amp;quot;strict mode&amp;quot; must be OFF (set to &amp;quot;&amp;quot; or &amp;quot;MYSQL40&amp;quot;) in the MySQL configuration file. &lt;br /&gt;
: PostgreSQL Notes: PostgreSQL 7.4 is recommended for earlier Moodle versions, since Moodle 1.8 only PostgreSQL 8.0 and above are supported.&lt;br /&gt;
* For showcases or low to medium-sized installations, Moodle 2.0 also includes (experimental) support for SQLite 3 database. This setup requires no database server, as the database file is stored in a local directory on the server.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== How many users? ==&lt;br /&gt;
&lt;br /&gt;
In addition to the hardware and software requirements, you will also need to think about the capacity of your Moodle installation in terms of the number of users it can handle. There are two numbers to plan for:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Browsing users&#039;&#039;&#039;: the maximum number of users able to browse your Moodle site. This is the number of computers in your organization or on your course (whichever is greater).&lt;br /&gt;
:&#039;&#039;&#039;Concurrent database users&#039;&#039;&#039;: the maximum number of concurrent database users (needed for Moodle activities such as quizzes). This is the number of users who will be using Moodle at the same time. In an educational institution, use your timetable/roster to obtain this figure.&lt;br /&gt;
&lt;br /&gt;
Once you know these figures for your users, you can start work out if your Moodle installation can support this capacity. The exact number of users depends on your hardware/software/network combination. Usually the amount of memory installed (RAM) is the deciding factor but a faster overall processor speed will also help in reducing waiting times for pages to load. &lt;br /&gt;
&lt;br /&gt;
The general rule of thumb for a single server is that the approx max concurrent users = RAM (GB) * 50 and the approx max browsing users = Approx max concurrent users * 5. As an example, a university with 500 total computers on campus and 100 concurrent users at any time will need approx 2GB of RAM on the one server to support the number of concurrent users.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note if you are using a hosted account&#039;&#039;&#039;: Ask your provider what limits are placed on the number of concurrent database connections and the processor load. This will give a good estimate of the number of users your Moodle install can manage.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note:&#039;&#039;&#039; As of August 31, 2007, Moodle 1.8.2+ is not recommended for large installations, especially if you have large number (e.g. 20,000+) of courses. The main reason is the codes related to ROLES are still not fully optimized with database queries and still need some work. If you are planning to use 1.8.x codes for a larger institution, please make sure that you have sufficient time to do your own testing and performance profiling.  Upgrade to Moodle 1.9!!&lt;br /&gt;
&lt;br /&gt;
[Update|Updating from a previous version] of Moodle has been improved quite a bit from 1.8.3+ version (see this thread discussion: http://moodle.org/mod/forum/discuss.php?d=83281).  Moodle 1.9 has even more improvements in all areas and is the recommended version.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Download and copy files into place ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to get Moodle, either as a compressed package or via [[CVS for Administrators]]. &lt;br /&gt;
&lt;br /&gt;
=== Download from compressed packages===&lt;br /&gt;
There are two types of compressed packages at the [http://download.moodle.org/ download.moodle.org page:] which offer a variety of version, operating systems and compression types.&lt;br /&gt;
#The &amp;quot;Standard Distribution&amp;quot; (with Moodle only files) and &lt;br /&gt;
#Several operating system &amp;quot;Complete Install Packages&amp;quot; (which contains programs to create a Moodle in a web environment). Please see [[Complete install packages]] for more information.  &lt;br /&gt;
&lt;br /&gt;
Most of these instructions are for the standard distribution, &lt;br /&gt;
Download a compressed package and then unpack the archive into your file structure using either of these two commands:&lt;br /&gt;
 tar -zxvf [filename]&lt;br /&gt;
 unzip [filename]&lt;br /&gt;
&lt;br /&gt;
===Download from CVS===&lt;br /&gt;
To use CVS, helpful instructions are available at the [[CVS_for_Administrators | CVS for Administrators]] page. The full [http://cvs.moodle.org/moodle/ Moodle CVS repository] is also available for browsing. &lt;br /&gt;
&lt;br /&gt;
If you are using CVS, run the CVS Checkout command.&lt;br /&gt;
&lt;br /&gt;
===Directory created placement===&lt;br /&gt;
After either of the above processes, you will now have with a directory called &amp;quot;moodle&amp;quot;, containing a number of files and folders.&lt;br /&gt;
&lt;br /&gt;
For the standard package, you can either place the whole folder in your web server documents directory, in which case the site will be located at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com/moodle&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;, or you can copy all the contents straight into the main web server documents directory, in which case the site will be simply &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; If you are downloading Moodle to your local computer and then uploading it to your web site, it is usually better to upload the whole archive as one file, and then do the unpacking on the server. Even web hosting interfaces like cPanel allow you to uncompress archives in the &amp;quot;File Manager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Structure of moodle directory ===&lt;br /&gt;
&lt;br /&gt;
You can safely skip this section, but here is a quick summary of the contents of the Moodle folder, to help get you oriented:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;config.php&#039;&#039; - contains basic settings. This file does not come with Moodle - you will create it by executing install.php or manually.&lt;br /&gt;
:&#039;&#039;install.php&#039;&#039; - the script you will run to create config.php&lt;br /&gt;
:&#039;&#039;version.php&#039;&#039; - defines the current version of Moodle code&lt;br /&gt;
:&#039;&#039;index.php&#039;&#039; - the front page of the site&lt;br /&gt;
:&#039;&#039;admin/&#039;&#039; - code to administrate the whole server&lt;br /&gt;
:&#039;&#039;auth/&#039;&#039; - plugin modules to authenticate users&lt;br /&gt;
:&#039;&#039;blocks/&#039;&#039; - plugin modules for the little side blocks on many pages&lt;br /&gt;
:&#039;&#039;calendar/&#039;&#039; - all the code for managing and displaying calendars&lt;br /&gt;
:&#039;&#039;course/&#039;&#039; - code to display and manage courses&lt;br /&gt;
:&#039;&#039;doc/&#039;&#039; - help documentation for Moodle (eg this page)&lt;br /&gt;
:&#039;&#039;files/&#039;&#039; - code to display and manage uploaded files&lt;br /&gt;
:&#039;&#039;lang/&#039;&#039; - texts in different languages, one directory per language&lt;br /&gt;
:&#039;&#039;lib/&#039;&#039; - libraries of core Moodle code&lt;br /&gt;
:&#039;&#039;login/&#039;&#039; - code to handle login and account creation&lt;br /&gt;
:&#039;&#039;mod/&#039;&#039; - all the main Moodle course modules are in here&lt;br /&gt;
:&#039;&#039;pix/&#039;&#039; - generic site graphics&lt;br /&gt;
:&#039;&#039;theme/&#039;&#039; - theme packs/skins to change the look of the site.&lt;br /&gt;
:&#039;&#039;user/&#039;&#039; - code to display and manage users&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Setting-up your system==&lt;br /&gt;
To ensure that Moodle will install successfully, you need to check that the web server settings are correct, then create a blank database for Moodle to use and finally create a directory on your hard disk for Moodle to save your materials and other files you upload into your courses.&lt;br /&gt;
&lt;br /&gt;
=== Check web server settings ===&lt;br /&gt;
&lt;br /&gt;
*Firstly, make sure that your web server is set up to use index.php as a default page (perhaps in addition to index.html, default.htm and so on). In Apache, this is done using a DirectoryIndex parameter in your httpd.conf file. Mine usually looks like this:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;DirectoryIndex&#039;&#039;&#039; index.php index.html index.htm&lt;br /&gt;
&lt;br /&gt;
:Just make sure index.php is in the list (and preferably towards the start of the list, for efficiency).&lt;br /&gt;
&lt;br /&gt;
*Secondly, &#039;&#039;&#039;if you are using Apache 2&#039;&#039;&#039;, then you should turn on the &#039;&#039;AcceptPathInfo&#039;&#039; variable, which allows scripts to be passed arguments like &amp;lt;nowiki&amp;gt;http://server/file.php/arg1/arg2&amp;lt;/nowiki&amp;gt;. This is essential to allow relative links between your resources, and also provides a performance boost for people using your Moodle web site. You can turn this on by adding these lines to your httpd.conf file. (NB: This setting, or any equivalent, is not required in Apache 1)&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
=== Recheck PHP settings ===&lt;br /&gt;
Moodle requires a number of PHP settings to be active for it to work. These were given in the Requirements section and &#039;&#039;&#039;On most servers these will already be the default settings&#039;&#039;&#039;.  However, some PHP servers (and some of the more recent PHP versions) may have things set differently, so it is useful to double-check that the settings are correct. These are defined in PHP&#039;s configuration file (usually called &#039;&#039;&#039;php.ini&#039;&#039;&#039;) or in the Apache &#039;&#039;&#039;.htaccess&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
 safe_mode = 0 (necessary)&lt;br /&gt;
 memory_limit = 40M (varies: minimum 16M, 32M Moodle v1.7, 40M Moodle v1.8, 128M large sites)&lt;br /&gt;
 session.save_handler = files (unless you are using another handler, e.g. mm)   &lt;br /&gt;
 magic_quotes_gpc = 1    (preferred but not necessary, 0 will be recommended in 2.0)&lt;br /&gt;
 magic_quotes_runtime = 0    (necessary)&lt;br /&gt;
 file_uploads = 1&lt;br /&gt;
 session.auto_start = 0&lt;br /&gt;
 session.bug_compat_warn = 0&lt;br /&gt;
&lt;br /&gt;
You may also want to set other, optional php.ini file settings while you are already editing it. For instance, you may want to reset the maximum upload size of file attachments, which usually defaults to 2M(egabytes). For instance, to set these to 16 Megabytes:&lt;br /&gt;
 &lt;br /&gt;
 post_max_size = 16M&lt;br /&gt;
 upload_max_filesize = 16M&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Using a .htaccess file for webserver and PHP settings ===&lt;br /&gt;
&lt;br /&gt;
Use the above if you can directly edit your server&#039;s files, but if you are setting-up Moodle on a webhost, or don&#039;t have access to &#039;&#039;&#039;httpd.conf&#039;&#039;&#039; or &#039;&#039;&#039;php.ini&#039;&#039;&#039; on your server, or you have Moodle on a server with other applications that require different settings, then don&#039;t worry, you can often still override the default settings. This only works on Apache servers and only when Overrides have been allowed in the main Apache configuration. Moodle is supplied with a htaccess file which you can use, or you can create your own file manually.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Use the default htaccess file&#039;&#039;&#039;. The easiest thing to do is just copy the sample file from moodle/lib/htaccess and edit it to suit your needs. It contains further instructions. For example, in a Unix shell:&lt;br /&gt;
&lt;br /&gt;
 cd moodle&lt;br /&gt;
 cp moodle/lib/htaccess .htaccess&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Create your own file&#039;&#039;&#039;. Alternatively you can create your own file called &#039;&#039;&#039;.htaccess&#039;&#039;&#039; in Moodle&#039;s main directory that contains lines like the following. &lt;br /&gt;
&lt;br /&gt;
 DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 php_value memory_limit 40M (adjust to your version of Moodle)&lt;br /&gt;
 php_flag magic_quotes_gpc 1&lt;br /&gt;
 php_flag magic_quotes_runtime 0&lt;br /&gt;
 php_flag file_uploads 1&lt;br /&gt;
 php_flag session.auto_start 0&lt;br /&gt;
 php_flag session.bug_compat_warn 0&lt;br /&gt;
&lt;br /&gt;
:If you have Apache version 2 installed, add these lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;IfDefine APACHE2&amp;gt;&lt;br /&gt;
     AcceptPathInfo on&lt;br /&gt;
 &amp;lt;/IfDefine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Otherwise add this single line:&lt;br /&gt;
&lt;br /&gt;
 AcceptPathInfo on&lt;br /&gt;
&lt;br /&gt;
:Optionally, you can also do things like define the maximum size for uploaded files, etc by adding these lines:&lt;br /&gt;
&lt;br /&gt;
 LimitRequestBody 0&lt;br /&gt;
 php_value upload_max_filesize 2M&lt;br /&gt;
 php_value post_max_size 2M&lt;br /&gt;
&lt;br /&gt;
:The value given in these lines is 2M. You may want to change this at a later date to allow uploading of larger files.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Some shared hosts do not allow .htaccess files&#039;&#039;&#039;. In this case, it may be necessary to place a php.ini file within each sub-directory of the site. To do this, you use your editor to create a php.ini file in the main moodle directory and later copy it to all sub-directories. The syntax for the php.ini file is different than the one used in .htaccess - you do not use the php_value and php_flag prefixes. See the example below:&lt;br /&gt;
 upload_max_filesize = 2M&lt;br /&gt;
 post_max_size = 2M&lt;br /&gt;
:After creating the php.ini file with all of the statements you need, run the script http://tips-scripts.com/php_ini_copy or copy php.ini manually to all sub-directories.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Some shared hosts use suPHP, which requires a slightly different configuration&#039;&#039;&#039;. If everything else fails, try creating the following two files and uploading to your moodle root directory&lt;br /&gt;
:php.ini (sample):&lt;br /&gt;
 register_globals = 0&lt;br /&gt;
 display_errors = 0&lt;br /&gt;
&lt;br /&gt;
:.htaccess (sample):&lt;br /&gt;
 suPHP_ConfigPath /home/cPanelName/public_html/moodle&lt;br /&gt;
&lt;br /&gt;
Change the above path to the actual path to your moodle install.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note&#039;&#039;&#039;: Use a .htaccess file only [http://httpd.apache.org/docs/1.3/howto/htaccess.html#when as a last resort] as it can have an impact on the performance of your Moodle site and cause pages to load slowly on your browser.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating an empty database ===&lt;br /&gt;
&lt;br /&gt;
You need to create an empty database (eg &amp;quot;&#039;&#039;moodle&#039;&#039;&amp;quot;) in your database system along with a special user (eg &amp;quot;moodleuser&amp;quot;) that has access to that database (and that database only). You could use the &amp;quot;root&amp;quot; user if you wanted to for a test server, but this is not recommended for a production system: if hackers manage to discover the password then your whole database system would be at risk, rather than just one database.&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;Warning&#039;&#039;&#039;: Bear in mind that, as of Moodle version 1.5.x, Moodle doesn&#039;t work with MySQL 5.x&#039;s strict mode setting (STRICT_TRANS_TABLES and/or STRICT_ALL_TABLES) -- see [http://moodle.org/mod/forum/discuss.php?d=58552 forum discussion]. So if you are using MySQL 5.x, edit MySQL&#039;s configuration file (called &amp;quot;my.ini&amp;quot; in Windows and &amp;quot;my.cnf&amp;quot; on Unix/Linux) and comment out that option or set it to &amp;lt;code&amp;gt;sql-mode=&#039;&#039;&amp;lt;/code&amp;gt;. You have to restart MySQL after changing this setting. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; If you do not have access to your server, use PHPMyAdmin (or another MySQL client) and enter the command &amp;lt;code&amp;gt;SET @@global.sql_mode=&#039;&#039;;&amp;lt;/code&amp;gt; (be sure to use single quotes, and don&#039;t forget the semicolon).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
====Using a hosted server====&lt;br /&gt;
If you are using a webhost, they will probably have a control panel web interface for you to create your database.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;[http://www.cpanel.com/ cPanel]&#039;&#039;&#039; system is one of the most popular of these. &lt;br /&gt;
To create a database using cPanel:&lt;br /&gt;
&lt;br /&gt;
# Click on the &#039;&#039;&#039;MySQL Databases&#039;&#039;&#039; icon.&lt;br /&gt;
# Type &#039;&#039;&#039;moodle&#039;&#039;&#039; in the New Database field and click &#039;&#039;&#039;Create Database&#039;&#039;&#039;.&lt;br /&gt;
# Type a &#039;&#039;username&#039;&#039; and &#039;&#039;password&#039;&#039; (not one you use elsewhere) in the respective fields and click &#039;&#039;&#039;Create  User&#039;&#039;&#039;.&amp;lt;br&amp;gt;Note that the &#039;&#039;username&#039;&#039; and &#039;&#039;database&#039;&#039; names may be prefixed by your cPanel account name and an underscore, and truncated to 16 characters. When entering this information into the Moodle installer - use the full names.&lt;br /&gt;
# Now use the &#039;&#039;&#039;Add Users to Databases&#039;&#039;&#039; button and give this new user account &#039;&#039;&#039;ALL&#039;&#039;&#039; rights to the new database.&lt;br /&gt;
&lt;br /&gt;
Continue with [[Installing_Moodle#Creating_the_data_directory |Creating the data directory]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Using a SQLite database====&lt;br /&gt;
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.&lt;br /&gt;
&lt;br /&gt;
Moodle 2.0 offers support for SQLite3 database installations. In this case, no database setup is required. The database file will be created by the installation script. By default, the database file will be store in Moodle&#039;s data directory (see [[Installing_Moodle#Creating_the_data_directory |Creating the data directory]]). During install, the web server must have write access on the directory where the database file will be stored. After installation, the web server must have read-write access to the database file.&lt;br /&gt;
&lt;br /&gt;
Continue with [[Installing_Moodle#Creating_the_data_directory |Creating the data directory]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Using the command line====&lt;br /&gt;
&lt;br /&gt;
If you have access to Unix or Windows command lines then you can do the same sort of thing by typing commands. You should do this using the MySQL Client program as follows (commands which you type-in are shown in bold):&lt;br /&gt;
&lt;br /&gt;
- Start the MySQL Client program:&lt;br /&gt;
 #&#039;&#039;&#039;mysql -u root -p&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 2 to server version: 5.0.22-log&lt;br /&gt;
 &lt;br /&gt;
 Type &#039;help;&#039; or &#039;\h&#039; for help. Type &#039;\c&#039; to clear the buffer.&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- The prompt changes to &amp;quot;mysql&amp;gt;&amp;quot; to indicate that you are now working in the MySQL Client program. When working in MySQL, all commands which you type-in must end in a semi-colon. (If you hit the Enter key without the final semi-colon, you&#039;ll get the line continuation symbol &#039;-&amp;gt;&#039;; this is your second chance to type the semi-colon and hit Enter.) &lt;br /&gt;
&lt;br /&gt;
- Begin by checking for any existing databases called &amp;quot;moodle&amp;quot; - if there are any you should change the name in all the commands which follow:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;SHOW DATABASES;&#039;&#039;&#039;&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | Database                |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | information_schema      |&lt;br /&gt;
 | mysql                   |&lt;br /&gt;
 | test                    |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 3 rows in set (0.03 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a database to store the Moodle tables. We&#039;ll call this &amp;quot;moodle&amp;quot;, as there are none with that name already in the above list, but change it if you need to.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;CREATE DATABASE moodle;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Change the default character set and collation of the &amp;quot;moodle&amp;quot; database to UTF8. Leave this out if you are installing Moodle 1.5 or earlier):&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a username and password to access the database &amp;quot;moodle&amp;quot; and grant database access permissions. We&#039;ll call the user &amp;quot;moodleuser&amp;quot; and set the password as &amp;quot;yourpassword&amp;quot;. It&#039;s a good idea to change these for your installation however most people keep the username as &amp;quot;moodleuser&amp;quot;. Remember the username and password you have set, as you&#039;ll need it in the configuration screens later. This is a long command so has been split over several lines by pressing the Return key.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;DROP,INDEX,ALTER ON moodle.*&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;TO moodleuser@localhost IDENTIFIED BY &#039;yourpassword&#039;;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Security Warnings&#039;&#039;&#039;: Never leave the password as the one shown here. Make sure you have a strong password (a mixture of letters and numbers, upper and lower case). Avoid granting &amp;quot;ALL&amp;quot; permissions on the database.&lt;br /&gt;
: &#039;&#039;&#039;Note&#039;&#039;&#039;: For MySQL 4.0.1 or earlier, you don&#039;t need the CREATE TEMPORARY TABLES permission. &lt;br /&gt;
&lt;br /&gt;
- Exit the MySQL Client program:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;QUIT&#039;&#039;&#039;&lt;br /&gt;
 Bye&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
- Reload the grant tables using the mysqladmin program:&lt;br /&gt;
 #&#039;&#039;&#039;mysqladmin -u root -p reload&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
And some example command lines for PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
   # su - postgres&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create user moodleuser createdb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser with encrypted password &#039;yourpassword&#039;;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create database moodle &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;with encoding &#039;unicode&#039;&amp;lt;/font&amp;gt;;&amp;quot; -U moodleuser template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser nocreatedb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; su - root&lt;br /&gt;
   # /etc/init.d/postgresql reload&lt;br /&gt;
&lt;br /&gt;
If the Postgres create database command above (&amp;gt;psql -c &amp;quot;create database moodle...&amp;quot;) gives an error message you may want to try:&lt;br /&gt;
 psql -c &amp;quot;create database moodle with template=template1 encoding = &#039;unicode&#039; owner =  moodleuser &amp;lt;br&amp;gt;     location = &#039;/var/mydata&#039;;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If the create database command asks you for a password, run the line containing &#039;encrypted password&#039; first before proceeding.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
* Step-by-step instructions on  [https://docs.moodle.org/en/Step-by-step_Install_Guide_for_Ubuntu installation for Ubuntu(Debian)]&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the data directory  ===&lt;br /&gt;
&lt;br /&gt;
Moodle will also need some space on your server&#039;s hard disk to store uploaded files, such as course documents and user pictures. The Moodle installer tries hard to create the &#039;&#039;&#039;moodledata&#039;&#039;&#039; directory for you but if it fails then you will have to create a directory for this purpose manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Security warning&#039;&#039;&#039;: For security purposes, it is &#039;&#039;&#039;CRITICAL&#039;&#039;&#039; that this directory is &#039;&#039;&#039;NOT&#039;&#039;&#039; accessible directly via the web. The easiest way to do this is to simply locate it OUTSIDE the web site root directory (it is the folder that the main part of your URL -that is, the part up to the first single / - points to; for example, in &amp;lt;nowiki&amp;gt;http://your.domain.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;, it is &amp;lt;nowiki&amp;gt;http://your.domain.com/&amp;lt;/nowiki&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
But if you must have it in the web directory (and you are using Apache AND the web server configuration allows .htaccess files to restrict access to directories) then protect it by creating a file in the data directory called &#039;&#039;&#039;.htaccess&#039;&#039;&#039;, containing these lines:&lt;br /&gt;
&lt;br /&gt;
 order deny,allow&lt;br /&gt;
 deny from all&lt;br /&gt;
&lt;br /&gt;
If you are using IIS, you need to edit the properties of the data directory (from the Internet Information Services Manager console) and deny access to that folder to everybody from the web.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you don&#039;t protect the data directory from direct web access, anybody will be able to impersonate any user of your Moodle site (including the admin user!!!), and all of your course materials will be available to the web at large.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ownership &amp;amp; Permissions&#039;&#039;&#039;: To make sure that Moodle can save uploaded files in this directory, check that the web server software has permission to read, write and execute in this directory. On Unix machines, this means setting the owner of the directory to be something like &amp;quot;nobody&amp;quot; or &amp;quot;apache&amp;quot;, and then giving that user read, write and execute permissions. As an example, to change the owner to &amp;quot;nobody&amp;quot; you could use:&lt;br /&gt;
&lt;br /&gt;
 chown -R nobody:apache moodledata&lt;br /&gt;
&lt;br /&gt;
To change the permissions so that the owner has read,write and execute permissions, use something like this:&lt;br /&gt;
&lt;br /&gt;
 chmod -R 0770 moodledata&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: If you are receiving permission denied messages, try &#039;&#039;chmod -R 0770 moodledata&#039;&#039; and then adjust the settings so that they are more secure. A more secure setting is &#039;&#039;chmod -R 0750 moodledata&#039;&#039;. According to the comments in config-dist.php, &amp;quot;On hosting systems you might need to make sure that your group has no permissions at all while others have full permissions.&amp;quot; To do this you could use &#039;&#039;chmod -R 707 moodledata&#039;&#039;. See also the [[Security | security page]].&lt;br /&gt;
&lt;br /&gt;
Remember that by default moodle will issue a warning about moodle data directories created inside the web directory, but otherwise this directory can be located where you wish. You can later move or change the location of this directory, but if you do, be sure to edit the setting in the &#039;&#039;&#039;config.php&#039;&#039;&#039; file that sets this; e.g. if moodledata is under a directory called data, then it would look like this:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/data/moodledata&#039;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CPanel and webhosts&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
On cPanel systems you can use the &amp;quot;File Manager&amp;quot; to find the folder, click on it, then choose &amp;quot;Change Permissions&amp;quot;. On many shared hosting servers, you will probably need to restrict all file access to your &amp;quot;group&amp;quot; (to prevent other webhost customers from looking at or changing your files), but provide full read/write access to everyone else (which will allow the web server to access your files). Speak to your server administrator if you are having trouble setting this up securely. In particular it will not be possible to create a usable data directory on sites that use a PHP feature known as &amp;quot;&#039;&#039;&#039;Safe Mode&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Run the installer script to create config.php ==&lt;br /&gt;
&lt;br /&gt;
To run the installer script (install.php), just try to access your Moodle main URL using a web browser, or access &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourserver/install.php&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039; directly.&lt;br /&gt;
&lt;br /&gt;
(The Installer will try to set a session cookie. If you get a popup warning in your browser make sure you accept that cookie!)&lt;br /&gt;
&lt;br /&gt;
Moodle will detect that configuration is necessary and will lead you through some screens to help you create a new configuration file called &#039;&#039;&#039;config.php&#039;&#039;&#039;. At the end of the process Moodle will try and write the file into the right location, otherwise you can press a button to download it from the installer and then upload &#039;&#039;&#039;config.php&#039;&#039;&#039; into the main Moodle directory on the server.&lt;br /&gt;
&lt;br /&gt;
Along the way the installer will test your server environment and give you suggestions about how to fix any problems. For most common issues these suggestions should be sufficient, but if you get stuck, check in the Installation Forum for more help.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Go to the admin page to continue configuration ==&lt;br /&gt;
&lt;br /&gt;
Once the basic config.php has been correctly created in the previous step, trying to access the front page of your site will take you to the &amp;quot;admin&amp;quot; page for the rest of the configuration.&lt;br /&gt;
&lt;br /&gt;
The first time you access this admin page, you will be presented with a GPL &amp;quot;shrink wrap&amp;quot; agreement with which you must agree before you can continue with the setup.&lt;br /&gt;
&lt;br /&gt;
Now Moodle will start setting up your database and creating tables to store data. Firstly, the main database tables are created. You should see a number of SQL statements followed by status messages that look like this:&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE course (&lt;br /&gt;
    id int(10) unsigned NOT NULL auto_increment,&lt;br /&gt;
    category int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    password varchar(50) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    fullname varchar(254) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    shortname varchar(15) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    summary text NOT NULL,&lt;br /&gt;
    format tinyint(4) NOT NULL default &#039;1&#039;,&lt;br /&gt;
    teacher varchar(100) NOT NULL default &#039;Teacher&#039;,&lt;br /&gt;
    startdate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    enddate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    timemodified int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    PRIMARY KEY (id)&lt;br /&gt;
 ) TYPE=MyISAM;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;SUCCESS&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and so on, followed by: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Main databases set up successfully.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see these, then there must have been some problem with the database or the configuration settings you defined in config.php. Check that PHP isn&#039;t in a restricted &amp;quot;Safe Mode&amp;quot; (commercial web hosts sometimes have safe mode turned on). You can check PHP variables by creating a little file containing &#039;&#039;&#039;&amp;lt;?php phpinfo() ?&amp;gt;&#039;&#039;&#039; and looking at it through a browser. Check all these and try this page again.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
You should now see a form where you can define more configuration variables for your installation, such as the default language, SMTP hosts and so on. Don&#039;t worry too much about getting everything right just now - you can always come back and edit these later on using the admin interface. The defaults are designed to be useful and secure for most sites. Scroll down to the bottom and click &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If (and only if) you find yourself getting stuck on this page, unable to continue, then your server probably has what I call the &amp;quot;buggy referrer&amp;quot; problem. This is easy to fix: just turn off the &amp;quot;secureforms&amp;quot; setting, then try to continue again.&lt;br /&gt;
&lt;br /&gt;
Next you will see more pages that print lots of status messages as they set up all the tables required by the various Moodle module. As before, they should all be &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;green&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
The next page is a form where you can define parameters for your Moodle site and the front page, such as the name, format, description and so on. Fill this out (you can always come back and change these later) and then press &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Finally, you will then be asked to create a top-level administration user for future access to the admin pages. Fill out the details with your own name, email etc and then click &amp;quot;Save changes&amp;quot;. Not all the fields are required, but if you miss any important fields you&#039;ll be re-prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you remember the username and password you chose for the administration user account, as they will be necessary to access the administration page in future.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(If for any reason your install is interrupted, or there is a system error of some kind that prevents you from logging in using the admin account, you can usually log in using the default username of &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;, with password &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
Once successful, you will be returned to the home page of your new site! Note the administration links that appear down the left hand side of the page (these items also appear on a separate Admin page) - these items are only visible to you because you are logged in as the admin user. All your further administration of Moodle can now be done using this menu, such as:&lt;br /&gt;
&lt;br /&gt;
* creating and deleting courses&lt;br /&gt;
* creating and editing user accounts&lt;br /&gt;
* administering teacher accounts&lt;br /&gt;
* changing site-wide settings like themes etc&lt;br /&gt;
&lt;br /&gt;
But you are not done installing yet! There is one very important thing still to do (see the next section on cron).&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Installing Moodle Using Command Line ==&lt;br /&gt;
{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
Installing Moodle Using command line is just as easy as installing Moodle using web browser. &lt;br /&gt;
* First Go to the moodle root directory and then to admin directory inside the moodle root. &lt;br /&gt;
&lt;br /&gt;
 $cd /var/www/html/moodle/admin&lt;br /&gt;
&lt;br /&gt;
* Then simply use the following syntax to run the moodle command line installer (this is a long command which has been split over 3 lines, so type as one line)&lt;br /&gt;
 $php cliupgrade.php --lang=en --webaddr=&amp;lt;nowiki&amp;gt;http://www.example.com&amp;lt;/nowiki&amp;gt; --moodledir=/var/www/html/moodle &lt;br /&gt;
                     --datadir=/var/moodledata --dbtype=mysql --dbhost=localhost --dbname=moodle &lt;br /&gt;
                     --dbuser=root --prefix=mdl --verbose=1 --interactivelevel=2 &lt;br /&gt;
&lt;br /&gt;
More information about the options can be found using &lt;br /&gt;
$php cliupgrad.php --help&lt;br /&gt;
&lt;br /&gt;
Then you will see the following list of available options&lt;br /&gt;
&lt;br /&gt;
 --lang		 		Valid installed language for installation. Default is English(en)&lt;br /&gt;
 --webaddr			Web address for the Moodle site&lt;br /&gt;
 --moodledir			Location of the moodle web folder&lt;br /&gt;
 --datadir			Location of the moodle data folder (should not be web visible)&lt;br /&gt;
 --dbtype			Database type. Default it mysql&lt;br /&gt;
 --dbhost			Database host. Default localhost&lt;br /&gt;
 --dbname			Database name. Default is moodle&lt;br /&gt;
 --dbuser			Database user. Default is blank&lt;br /&gt;
 --dbpass			Database password. Default is blank&lt;br /&gt;
 --prefix			        Table prefix for above database tables. Default is mdl&lt;br /&gt;
 --verbose			0 No output, 1 Summarized output(Default), 2 Detailed output&lt;br /&gt;
 --interactivelevel	        0 Non interactive, 1 Semi interactive(Default), 2 Interactive&lt;br /&gt;
 --help				print out this help&lt;br /&gt;
&lt;br /&gt;
When you choose non interactive mode without any options all the default values are assumed.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Set up cron ==&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s background tasks (e.g. sending out forum emails and performing course backups) are performed by a script which you can set to execute at specific times of the day. This is known as a cron script. Please refer to the [[Cron|Cron instructions]].&lt;br /&gt;
&lt;br /&gt;
== Set up backups ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[Backup settings| backup instructions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Create a new course ==&lt;br /&gt;
&lt;br /&gt;
Now that Moodle is running properly, you can try creating a new course to play with.&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Create a new course&amp;quot; from the Admin page (or the admin links on the home page).&lt;br /&gt;
&lt;br /&gt;
Fill out the form, paying special attention to the course format. You don&#039;t have to worry about the details too much at this stage, as everything can be changed later by the teacher. Note that the yellow help icons are everywhere to provide contextual help on any aspect.&lt;br /&gt;
&lt;br /&gt;
Press &amp;quot;Save changes&amp;quot;, and you will be taken to a new form where you can assign teachers to the course. You can only add existing user accounts from this form - if you want to create a new teacher account then either ask the teacher to create one for themselves (see the login page), or create one for them using the &amp;quot;Add a new user&amp;quot; on the Admin page.&lt;br /&gt;
&lt;br /&gt;
Once done, the course is ready to customize, and is accessible via the &amp;quot;Courses&amp;quot; link on the home page.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Installation FAQ]]&lt;br /&gt;
* [[Complete install packages]] might be an easier first time installs on some systems&lt;br /&gt;
* Help forum:  [http://moodle.org/mod/forum/view.php?id=28 Installation problems]&lt;br /&gt;
* [[Installing Apache, MySQL and PHP]] - Open source programs that can run Moodle on the web or on a desktop&lt;br /&gt;
* [[Upgrading Moodle]]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=42688 Selecting a web host for Moodle] forum discussion&lt;br /&gt;
* [[masquerading|Masquerading]] - Running Moodle behind a masquerading/NAT firewall&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[cs:Instalace]]&lt;br /&gt;
[[de:Installieren von Moodle]]&lt;br /&gt;
[[es:Instalación de moodle]]&lt;br /&gt;
[[fr:Installation de Moodle]]&lt;br /&gt;
[[ja:Moodleのインストール]]&lt;br /&gt;
[[nl:Installatiegids]]&lt;br /&gt;
[[pl:Instalacja Moodle]]&lt;br /&gt;
[[pt:Instalação do Moodle]]&lt;br /&gt;
[[ru:Установка Moodle]]&lt;br /&gt;
[[sk:Inštalácia]]&lt;br /&gt;
[[zh:安装Moodlezh:]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Email_setup_gmail&amp;diff=46990</id>
		<title>Email setup gmail</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Email_setup_gmail&amp;diff=46990"/>
		<updated>2008-11-21T00:10:05Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Tips and tricks */  clarification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Google&#039;s mail servers can be set up as the SMTP server for Moodle.  This reduces or eliminates the need for an email service on a server and is especially useful if [http://www.google.com/apps/ Google Apps] is used by the institution using Moodle.  &lt;br /&gt;
&lt;br /&gt;
This will require a hack to the code.&lt;br /&gt;
&lt;br /&gt;
== [[Email settings]] ==&lt;br /&gt;
Location: &#039;&#039;Administration &amp;gt; Server &amp;gt; [[Email settings|Email]]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMTP hosts:&#039;&#039;&#039; smtp.gmail.com:465   &#039;&#039;NOTE: Leave out the port (:465) in 1.9.2 or lower&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMTP username:&#039;&#039;&#039; Your email address @gmail.com or your own domain if using Google Apps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMTP password:&#039;&#039;&#039; password for the above email account&lt;br /&gt;
&lt;br /&gt;
== Code Modification ==&lt;br /&gt;
In your Moodle site go to &amp;lt;tt&amp;gt;/lib/phpmailer/&amp;lt;/tt&amp;gt; and modify the following file:&lt;br /&gt;
&lt;br /&gt;
=== class.smtp.php ===&lt;br /&gt;
Around line 83 DIRECTLY after the &#039;&#039;&#039;Connect&#039;&#039;&#039; function header, insert this line immediately after the &amp;quot;{&amp;quot; :&lt;br /&gt;
 $host = &#039;ssl://&#039; . $host;&lt;br /&gt;
&lt;br /&gt;
== Code Modification (1.9.2 or lower) == &lt;br /&gt;
These two additional modifications need to be made in 1.9.2 or lower as the &#039;&#039;&#039;SMTP hosts&#039;&#039;&#039; setting above will not allow the port to be included.&lt;br /&gt;
&lt;br /&gt;
=== class.phpmailer.php ===&lt;br /&gt;
around line 162 &lt;br /&gt;
*Change &amp;lt;tt&amp;gt;var $Port = 25;&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;var $Port = 465;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== class.smtp.php ===&lt;br /&gt;
around line 30&lt;br /&gt;
*Change &amp;lt;tt&amp;gt;var $SMTP_PORT = 25;&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;var $SMTP_PORT = 465;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tips and tricks ==&lt;br /&gt;
&lt;br /&gt;
* Some sites may need the additional step of un-commenting the &#039;&#039;&#039;php_openssl.dll&#039;&#039;&#039; extension in &amp;lt;tt&amp;gt;php.ini&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== See also==&lt;br /&gt;
[[Email settings]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Email_setup_gmail&amp;diff=46989</id>
		<title>Email setup gmail</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Email_setup_gmail&amp;diff=46989"/>
		<updated>2008-11-21T00:08:18Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Code Modification */ grammar corrections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Google&#039;s mail servers can be set up as the SMTP server for Moodle.  This reduces or eliminates the need for an email service on a server and is especially useful if [http://www.google.com/apps/ Google Apps] is used by the institution using Moodle.  &lt;br /&gt;
&lt;br /&gt;
This will require a hack to the code.&lt;br /&gt;
&lt;br /&gt;
== [[Email settings]] ==&lt;br /&gt;
Location: &#039;&#039;Administration &amp;gt; Server &amp;gt; [[Email settings|Email]]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMTP hosts:&#039;&#039;&#039; smtp.gmail.com:465   &#039;&#039;NOTE: Leave out the port (:465) in 1.9.2 or lower&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMTP username:&#039;&#039;&#039; Your email address @gmail.com or your own domain if using Google Apps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMTP password:&#039;&#039;&#039; password for the above email account&lt;br /&gt;
&lt;br /&gt;
== Code Modification ==&lt;br /&gt;
In your Moodle site go to &amp;lt;tt&amp;gt;/lib/phpmailer/&amp;lt;/tt&amp;gt; and modify the following file:&lt;br /&gt;
&lt;br /&gt;
=== class.smtp.php ===&lt;br /&gt;
Around line 83 DIRECTLY after the &#039;&#039;&#039;Connect&#039;&#039;&#039; function header, insert this line immediately after the &amp;quot;{&amp;quot; :&lt;br /&gt;
 $host = &#039;ssl://&#039; . $host;&lt;br /&gt;
&lt;br /&gt;
== Code Modification (1.9.2 or lower) == &lt;br /&gt;
These two additional modifications need to be made in 1.9.2 or lower as the &#039;&#039;&#039;SMTP hosts&#039;&#039;&#039; setting above will not allow the port to be included.&lt;br /&gt;
&lt;br /&gt;
=== class.phpmailer.php ===&lt;br /&gt;
around line 162 &lt;br /&gt;
*Change &amp;lt;tt&amp;gt;var $Port = 25;&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;var $Port = 465;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== class.smtp.php ===&lt;br /&gt;
around line 30&lt;br /&gt;
*Change &amp;lt;tt&amp;gt;var $SMTP_PORT = 25;&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;var $SMTP_PORT = 465;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tips and tricks ==&lt;br /&gt;
&lt;br /&gt;
* Some sites may need an additional step to un-comment the &#039;&#039;&#039;php_openssl.dll&#039;&#039;&#039; extension in &amp;lt;tt&amp;gt;php.ini&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== See also==&lt;br /&gt;
[[Email settings]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=46942</id>
		<title>Installation FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=46942"/>
		<updated>2008-11-19T09:53:54Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Installation hangs when setting-up database tables */  added another work-around&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==PHP - is it installed and what version do I have?==&lt;br /&gt;
&lt;br /&gt;
Make a new file on your web site called &#039;&#039;info.php&#039;&#039;, containing the following text, and call it from your browser:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?PHP phpinfo() ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If nothing happens then you don&#039;t have PHP installed or your webserver is not configured to handle .php files properly. See the installation docs for some information about where to download it for your computer. See the [[phpinfo]] page for details about the content of this page.&lt;br /&gt;
&lt;br /&gt;
== System information needed for Installation problems forum ==&lt;br /&gt;
When posting questions to the [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum], try to provide as much background information as possible about your moodle system. Use this template to copy and paste into your post:&lt;br /&gt;
* Server Operating System name (version also if possible): &lt;br /&gt;
* Browser name (version also if possible):&lt;br /&gt;
* Moodle version:&lt;br /&gt;
* Moodle install type? (New/Upgrade):&lt;br /&gt;
* Moodle config.php attached?(Y/N):&lt;br /&gt;
* Phpinfo attached? (Y/N):&lt;br /&gt;
&lt;br /&gt;
For the last two items, try to include the following in your post as an attachment:&lt;br /&gt;
* A copy of your phpinfo output as shown in your browser (see the instructions above for an explanation of how to obtain this, or see [[phpinfo]]).&lt;br /&gt;
* A copy of the Moodle configuration file (with secret info like database password deleted, of course). This is located in the main Moodle directory (by default called moodle), and is named config.php&lt;br /&gt;
&lt;br /&gt;
Copy and paste both of these into a single text file (using vi, Notepad, etc) and attach this to your post. If your PC is a Windows box and config.php looks messy (line breaks missing or in the wrong places) in Notepad, try Wordpad.&lt;br /&gt;
&lt;br /&gt;
If you cannot provide your phpinfo, try to copy &amp;amp; paste and complete these in your post:&lt;br /&gt;
* Webserver (e.g. Apache/IIS) version:&lt;br /&gt;
* Database server (e.g. MySQL, PostgreSQL) version:&lt;br /&gt;
* PHP version:&lt;br /&gt;
&lt;br /&gt;
For installation on web hosting accounts: contact your support desk who should be able to tell you this information.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Security Warning&#039;&#039;&#039;: Make sure you edit any files and delete any passwords before posting onto the forum.&lt;br /&gt;
&lt;br /&gt;
==What &amp;amp; where are Moodle&#039;s configuration settings stored?==&lt;br /&gt;
Configuration settings are stored in the config.php file stored in your moodle folder. This file is created during the installation process. If there is a problem and the installation cannot create the file, you can try creating it manually from the [[Configuration file]] docs. Please remember that manually editing the file is not recommended and may lead to blank pages, especially if there are additional spaces and/or lines after the final php closing tag &amp;quot;?&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Downloading previous releases of Moodle==&lt;br /&gt;
* &#039;&#039;&#039;Generic Packages&#039;&#039;&#039;: If your server does not meet the [[Installing_Moodle#Requirements | requirements]] for the current version of Moodle, you can download previous releases by using wget, lynx or curl with this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
:For example: to download Moodle version 1.5, use http://download.moodle.org/stable15. You&#039;ll see a directory tree with the files displayed. Click on the one you want and download as normal - if you require the latest update of the version, scroll to the end of the list and download the &amp;quot;moodle-latest&amp;quot; file, or alternatively use these URLs for zip or tgz downloads:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].tgz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Changes made in the version in the last month are listed in the &amp;quot;CHANGES&amp;quot; file in the directory listing. The files you download contain Moodle code and are not the Windows or Mac packages - so you need to have a webserver, a database server and PHP already installed. The earliest version available is Moodle 1.3.&lt;br /&gt;
* &#039;&#039;&#039;Windows Packages&#039;&#039;&#039;: To download previous releases of the Moodle packages for Windows, use this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/windows/MoodleWindowsInstaller-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Mac Packages&#039;&#039;&#039;: To download previous releases of the Mac pacakges, use either of these URLs (depending on whether you need the Intel or PPC package):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-Intel-[version_number].dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-PPC-[version_number}.dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Using CVS&#039;&#039;&#039;: You can also use CVS to download older releases and incremental releases of the Moodle generic packages, e.g. Moodle 1.5.4 - see the [[CVS_for_Administrators | CVS documentation]].&lt;br /&gt;
&lt;br /&gt;
== How to enable and check PHP error logs==&lt;br /&gt;
PHP can be set up to log errors in a variety of different ways: two of these involve the use of the php.ini file and the ini_set command. &lt;br /&gt;
* &#039;&#039;&#039;Using the php.ini file&#039;&#039;&#039;: The log settings are contained in the php.ini file stored on the server. If you don&#039;t know where that is, edit your Moodle &#039;&#039;config.php&#039;&#039; and add the following as the second line&lt;br /&gt;
&lt;br /&gt;
  phpinfo();&lt;br /&gt;
&lt;br /&gt;
:then reload the web page. Look for the entry &#039;&#039;&#039;Configuration File (php.ini) Path&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:When you have located php.ini open it in your favorite text editor. Find the &#039;&#039;&#039;Error handling and logging&#039;&#039;&#039; section of the php.ini file. Make sure that both &#039;&#039;&#039;display_errors = On&#039;&#039;&#039;, &#039;&#039;&#039;display_startup_errors = On&#039;&#039;&#039; and &#039;&#039;&#039;log_errors = On&#039;&#039;&#039; are present and uncommented. Check the value of &#039;&#039;&#039;error_log&#039;&#039;&#039; - 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).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Using ini_set commands&#039;&#039;&#039;: If you are using Moodle 1.7 or higher, the previous steps are not enough. In those versions error logging parameters are dependant on certain administrative settings that you specify in the debugging section. The problem is that if you can&#039;t access the administrative pages, you can&#039;t set the debugging options. So the only way to modify them is by adding the following lines to your config.php file, just before the last line (the one containing a single&#039;?&amp;gt;&#039; only):&lt;br /&gt;
&lt;br /&gt;
  ini_set (&#039;display_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;log_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;display_startup_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;error_reporting&#039;, E_ALL);&lt;br /&gt;
  $CFG-&amp;gt;debug = DEBUG_ALL;&lt;br /&gt;
&lt;br /&gt;
:This will enable the same settings specified above even if Moodle sets them otherwise. &lt;br /&gt;
:&#039;&#039;&#039;Important&#039;&#039;&#039;: Remember to put them just before the last line of config.php.&lt;br /&gt;
&lt;br /&gt;
==Email copies are not being sent from my forums==&lt;br /&gt;
&lt;br /&gt;
You &#039;&#039;must&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
Basically, you need to set up a process to regularly call the script &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://yoursite/admin/cron.php&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Please refer to the [[Cron|cron instructions]].&lt;br /&gt;
&lt;br /&gt;
Tips:&lt;br /&gt;
* Try the default settings in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039;. This generally works.&lt;br /&gt;
*Make sure that &#039;&#039;allowuseremailcharset&#039;&#039; in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039; is set to No. Setting this to Yes can cause a problem in some versions of Moodle.&lt;br /&gt;
&lt;br /&gt;
==I can&#039;t log in - I just stay stuck on the login screen==&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;src=bar_sch_nam Norton firewall products].&lt;br /&gt;
&lt;br /&gt;
Another possible cause of this problem is that sessions are not configured properly on the server. You can test this by calling the script &amp;lt;nowiki&amp;gt;http://yourserver/moodle/lib/session-test.php&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are still having problems, read the [[Can_not_log_in | Cannot log in]] page.&lt;br /&gt;
&lt;br /&gt;
==I log in but the login link doesn&#039;t change. I am logged in and can navigate freely.==&lt;br /&gt;
&lt;br /&gt;
Make sure the URL in your &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; setting is exactly the same as the one you are actually using to access the site.&lt;br /&gt;
&lt;br /&gt;
==Uploaded files give &amp;quot;File not found&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
For example: Not Found: The requested URL /moodle/file.php/2/myfile.jpg was not found on this server.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;httpd.conf&#039;&#039;, or to a &#039;&#039;.htaccess&#039;&#039; file in your local directory (see [[Installing Moodle]] for more details):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
Note, this will ONLY work for Apache versions 2.x.&lt;br /&gt;
&lt;br /&gt;
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&#039;t be able to use relative links within HTML resources.&lt;br /&gt;
&lt;br /&gt;
To use this alternative method, you should change the &#039;&#039;slasharguments&#039;&#039; variable. For moodle versions &amp;lt; 1.7, this is located in the Operating System section of &#039;&#039;Administration &amp;gt; Configuration &amp;gt; [[admin/config|Variables]]&#039;&#039;. In later versions, this option is located in &#039;&#039;Site Administration &amp;gt; Server &amp;gt; HTTP&#039;&#039;. You should now be able to access your uploaded files.&lt;br /&gt;
&lt;br /&gt;
==Why are all my pages blank?==&lt;br /&gt;
&lt;br /&gt;
Check the dirroot variable in &#039;&#039;config.php&#039;&#039;. You must use complete, absolute pathnames e.g.&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dirroot = &amp;quot;d:\inetpub\sites\www.yoursite.com\web\moodle&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
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 see [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | How to enable and check PHP error logs]].&lt;br /&gt;
&lt;br /&gt;
To determine if MySQL support is your problem, insert this as the second line in your &#039;&#039;config.php&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
 phpinfo();&lt;br /&gt;
&lt;br /&gt;
then reload the web page. Examine the output closely to see if MySQL is supported. If not look for a package you are missing.&lt;br /&gt;
&lt;br /&gt;
== Why is a particular page blank or incomplete? ==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your web server log files!!&#039;&#039;&#039; &lt;br /&gt;
:If a particular page is blank or incomplete (it doesn&#039;t display the footer), before you do anything else [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | check your error logs]]. Having established that PHP error 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.&lt;br /&gt;
&lt;br /&gt;
*If you are &#039;&#039;&#039;upgrading to a new version of Moodle&#039;&#039;&#039;, check that you do not have an old version of a non-standard block or module installed. Remove any such blocks or modules installed using the admin settings page and start the install process again. However, do also make sure that you have included all optional plugins that were required by your courses. &lt;br /&gt;
&lt;br /&gt;
*If you &#039;&#039;&#039;do not see any blocks listed&#039;&#039;&#039;, turn editing on and remove any blocks that you have added to that page and try reloading.&lt;br /&gt;
&lt;br /&gt;
*You may get this error immediately after &#039;&#039;&#039;selecting a language&#039;&#039;&#039;. At this stage of the installation process your Moodle computer may need to connect to the Internet and download a language pack, so check that the computer can access the Internet by using a browser. Check also that your PHP settings are as given in the Moodle [[Installing_Moodle#Requirements | Moodle Requirements]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=97734 PHP configuration error] forum discussion  &lt;br /&gt;
&lt;br /&gt;
==Installation hangs when setting-up database tables==&lt;br /&gt;
Sometimes the installation will hang when setting up tables. This will be an abrupt hang with half the page displayed in the browser and/or other outputs removed. Examples are:&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Truncated MySQL statements&#039;&#039;&#039;:&lt;br /&gt;
 &lt;br /&gt;
 (mysql): SET NAMES &#039;utf8&#039;&lt;br /&gt;
 --------------------------------------------------------------------------------&lt;br /&gt;
 (mysql): SHOW LOCAL VARIABLES LIKE &#039;character_set_database&#039;&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 (no more statements are displayed)   &lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Missing Continue button&#039;&#039;&#039;: The “Scroll to continue” link is displayed but no “Continue” button is there. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: There is an exception to this when upgrading an existing database and the installation may appear to hang at the roles generation phase. This process can take a very long time - so please be patient.&lt;br /&gt;
&lt;br /&gt;
Below are some solutions you can try to overcome this problem:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check for MySQL limits&#039;&#039;&#039;. This is often a MySQL error and not a php error. Check that there is no limit placed on your mysql database, e.g. a &amp;quot;questions&amp;quot; limit. See [http://dev.mysql.com/doc/refman/5.0/en/user-resources.html Limiting Account Resources in the MySQL manual].&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your .htaccess files&#039;&#039;&#039;. If the install is on a webhost, adding the following line to the .htaccess file in the Moodle directory has been known to solve the problem.&lt;br /&gt;
 AddType x-mapp-php5 .php&lt;br /&gt;
&lt;br /&gt;
:Try also renaming the .htaccess file so that it is disabled.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Code customizations&#039;&#039;&#039;. You may also want to look and see if you&#039;ve customized any of your code.  Look at the last successful table, and then look at the block, mod, or other code that is referenced by that table.  For example, if your install hangs and continues to say that the forum tables were successful as the last message, look at /mod/forum/ for any custom code.  If you have customized code, backup those files and replace with the correct files.  You can then restart the install by renaming config.php or reinstalling your database from the backup.  If your install is successful, you can make your code changes back into the stock Moodle code.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your memory limit&#039;&#039;&#039;. It may also be that the &amp;quot;memory_limit&amp;quot; in your php.ini is set too low. Please check your php.ini file and allocate the recommended amount (see [https://docs.moodle.org/en/Installing_Moodle#Requirements Moodle requirements]). For Moodle version 1.8 and above at least 40MB is  recommended.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Upgrade incrementally&#039;&#039;&#039;. To avoid this problem when upgrading, it is recommended to upgrade via each version of Moodle, for example 1.7 -&amp;gt; 1.8 -&amp;gt; 1.9 (with the exception of upgrading from 1.5 or 1.6, when it is recommended that 1.7 be skipped, in other words upgrade 1.5 -&amp;gt; 1.6 -&amp;gt; 1.8 -&amp;gt; 1.9).&lt;br /&gt;
&lt;br /&gt;
A work-around to this problem is to setup a working Moodle system on your local PC or server using the [http://download.moodle.org Moodle Packages]. Once you have a running Moodle, [https://docs.moodle.org/en/Upgrading_Moodle#Backup_important_data backup the database] and import to your webhost. Then backup the Moodle code itself (the &amp;quot;moodle&amp;quot; directory on your PC) and copy this to your webhost using (for example) FTP. Finally, edit the moodle/config.php file for the new settings that have to be changed for the webhost.&lt;br /&gt;
&lt;br /&gt;
Some Moodlers have found the suggestion in http://moodle.org/mod/forum/discuss.php?d=65786#p297433 helpful, for some unknown reason. It claims that it is because the fopen function in the line (now line 426 instead of 406) was not being given a string as the first argument, but that&#039;s not true. It was a string; after the edit it is a string whose first and last characters are single quote marks. The amazing thing is that it works at all after that edit. What&#039;s even more amazing is that it fixes the problem, at least for some users. Go figure.&lt;br /&gt;
&lt;br /&gt;
==Why can&#039;t I upload a new image into my profile?==&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see anything on your user profile pages to let you upload user images then it&#039;s usually because GD is not enabled on your server. GD is a library that allows image processing.&lt;br /&gt;
&lt;br /&gt;
1. Make sure &#039;&#039;&#039;GD has been included in your PHP installation&#039;&#039;&#039;. You can check this by going into Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[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.&lt;br /&gt;
&lt;br /&gt;
2. If Moodle thinks GD is not installed, then you will need to &#039;&#039;&#039;install the GD library&#039;&#039;&#039;. &lt;br /&gt;
*On Unix you may need to re-compile PHP with arguments something like this:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-gd &lt;br /&gt;
 --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-ttf --enable-gd-native-ttf &lt;br /&gt;
 --enable-magic-quotes --with-mysql --enable-sockets --enable-track-vars &lt;br /&gt;
 --enable-versioning --with-zlib&lt;br /&gt;
&lt;br /&gt;
* On Windows this is usually a matter of &amp;quot;turning on&amp;quot; the extension in PHP by editing your php.ini file. To do this remove the semicolon for the php_gd2.dll extension - check that this file is actually present in your php extensions  folder first (search your php.ini for extension_dir to determine where this points to on your hard disk). You should then have a line that looks like this:&lt;br /&gt;
 extension=php_gd2.dll&lt;br /&gt;
&lt;br /&gt;
:Windows users should see the [[Installing AMP|installation instructions]] for further help. &lt;br /&gt;
&lt;br /&gt;
3. Remember to &#039;&#039;&#039;restart your webserver&#039;&#039;&#039; (if possible) and re-visit the Moodle configuration page after making any changes to PHP so it can pick up the correct version of GD.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=44271 Profile pictures] for additional information.&lt;br /&gt;
&lt;br /&gt;
== Why doesn&#039;t my Moodle site display the time and date correctly? ==&lt;br /&gt;
&lt;br /&gt;
Each language requires a specific language code (called a &#039;&#039;&#039;locale&#039;&#039;&#039; code) to allow dates to be displayed correctly. The language packs contain default standard codes, but sometimes these don&#039;t work on Windows servers.&lt;br /&gt;
&lt;br /&gt;
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. &amp;quot;esp_esp&amp;quot; for spanish)&lt;br /&gt;
&lt;br /&gt;
These new locale codes can be entered on the Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]] page, where they override the ones in the currently chosen language pack.&lt;br /&gt;
&lt;br /&gt;
==How do I uninstall Moodle?==&lt;br /&gt;
&#039;&#039;&#039;Moodle package installation&#039;&#039;&#039;: If you have downloaded a Moodle package, simply uninstall using your system commands. On Windows PCs, you should access the Control Panel -&amp;gt; Add/Remove Programs. Select the package name and click Change or Remove Programs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Webhost/manual installation&#039;&#039;&#039;: If you have installed Moodle manually or have installed onto a webhost, follow these steps:&lt;br /&gt;
*Delete the moodle database using this mysql command (or delete using your mysql client, e.g. PHPMyAdmin):&lt;br /&gt;
&amp;lt;pre&amp;gt;sql&amp;gt;DROP DATABASE moodle;&amp;lt;/pre&amp;gt;&lt;br /&gt;
:In the above example replace &#039;moodle&#039; with the name of the moodle database you created when installing.&lt;br /&gt;
*Delete the moodledata directory. If you, or your users, have uploaded materials into this directory take a copy of these before deleting this directory.&lt;br /&gt;
*Delete the moodle directory itself. This will delete all of the moodle PHP script files.&lt;br /&gt;
&lt;br /&gt;
==How do I upgrade Moodle? Do I just overwrite the files?==&lt;br /&gt;
Do not overwrite files, it may cause strange errors. You should read the [[Upgrade]] documentation before proceeding.&lt;br /&gt;
&lt;br /&gt;
==Migrating Moodle to a new site or server==&lt;br /&gt;
Migrating Moodle means that you have to move the current installation to a new server, and so may have to change IP addresses or DNS entries. To do this you will need to change the $CFG-&amp;gt;wwwroot value in the config.php on the new server. You will also have to change any absolute links stored in the database backup file (before restoring the file on the new server) either using the admin/replace.php script, your text editor or another &amp;quot;search and replace&amp;quot; tool, e.g. sed. For more details see the [[Moodle_migration | Moodle Migration]] page.&lt;br /&gt;
&lt;br /&gt;
==Why does my new installation display correctly on the server, but when I view it from a different machine, styles and images are missing?==&lt;br /&gt;
In the installation instructions, one of the suggested settings for &#039;webroot&#039; is &#039;localhost&#039;. This is fine if all you want to do is some local testing of your new Moodle installation. If, however, you want to view your new installation from another machine on the same local area network, or view your site on the internet, you will have to change this setting:&lt;br /&gt;
*For local testing, &#039;localhost&#039; is fine for the webroot ($CFG-&amp;gt;wwwroot in config.php). &lt;br /&gt;
*If you want to test your site from other machines on the same local area network (LAN), then you will have to use the private ip address of the serving machine, (e.g. 192.168.1.2/moodle) or the network name of the serving computer (e.g. network_name_of_serving_machine/moodle) as the web root. Depending on your LAN setup, it may be better to use the network name of the computer rather than its (private) ip address, because the ip address can and will change from time to time. If you don&#039;t want to use the network name, then you will have to speak to your network administrator and have them assign a permanent ip address to the serving machine.&lt;br /&gt;
*Finally, if you want to test your new installation across the internet, you will have to use either a domain name or a permanent (public) ip address/moodle as your web root. To handle both types of access, see [https://docs.moodle.org/en/masquerading masquerading].&lt;br /&gt;
&lt;br /&gt;
==Maximum upload file size - how to change it?==&lt;br /&gt;
There are several places to change the maximum file upload size. The first place to check is the Administration block.   Security -&amp;gt; Site Policies -&amp;gt; and look for &amp;quot;Maximum Uploaded File Size&amp;quot;.  This is the &amp;quot;maxbyte&amp;quot; variable found in older versions of Moodle (under Admin &amp;gt; Variables). Teachers may also set the maximum file size by the [[Course_settings#Maximum_upload_size|course administration block]].&lt;br /&gt;
&lt;br /&gt;
The second place to check are the server files.  The php.ini file has a limit which will override any other setting. (Hint: remember to restart your server for changes to take effect).  For more help see:&lt;br /&gt;
*[[Administration_FAQ#How_do_the_limits_on_uploaded_files_work.3F]]&lt;br /&gt;
*[[Installing_Moodle#Recheck_PHP_settings]]&lt;br /&gt;
*[[Installing_Moodle#Using_a_.htaccess_file_for_webserver_and_PHP_settings]]&lt;br /&gt;
*[[Site_policies#Maximum_uploaded_file_size]]&lt;br /&gt;
&lt;br /&gt;
==How do I install Moodle on Windows Vista?==&lt;br /&gt;
&lt;br /&gt;
See [[Installing Moodle on Windows Vista]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Errors FAQ]]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:FAQ Instalación]]&lt;br /&gt;
[[fr:FAQ d&#039;installation]]&lt;br /&gt;
[[nl:Installatie FAQ]]&lt;br /&gt;
[[ja:インストールFAQ]]&lt;br /&gt;
[[ru:Установка FAQ]]&lt;br /&gt;
[[pl:Instalacja FAQ]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:SCORM_FAQ&amp;diff=46780</id>
		<title>Talk:SCORM FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:SCORM_FAQ&amp;diff=46780"/>
		<updated>2008-11-15T17:02:22Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: New section: slash arguments warning when I add/update SCORM obects in my course&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page needs more information on SCORM conformance. &lt;br /&gt;
&lt;br /&gt;
It should probably state something explicit like &amp;quot;Moodle achieves the conformace label &#039;LMS-RTE-3&#039; as defined in the ADL SCORM® Version 1.2 Conformance Matrix&amp;quot;. &lt;br /&gt;
(Sure - a lot of the SCORM docs need improving! - are you volunteering to flesh it out? ;-) --[[User:Dan Marsden|Dan Marsden]] 21:15, 29 October 2008 (CDT) )&lt;br /&gt;
&lt;br /&gt;
Is moodle applying for certification for 1.2?&lt;br /&gt;
(Piers re-ran the Scorm 1.2 tests on Moodle 1.9.3 today and it passed all tests - keep an eye on the scorm forum for details about certification - It&#039;s coming soon! --[[User:Dan Marsden|Dan Marsden]] 21:15, 29 October 2008 (CDT))&lt;br /&gt;
&lt;br /&gt;
What about SCORM 2004?&lt;br /&gt;
this probably explains where this is at:&lt;br /&gt;
http://moodle.org/mod/forum/discuss.php?d=106299 &lt;br /&gt;
--[[User:Dan Marsden|Dan Marsden]] 21:15, 29 October 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== slash arguments warning when I add/update SCORM obects in my course ==&lt;br /&gt;
&lt;br /&gt;
Why does this section of the article refer readers to an FAQ page on moodle.org&#039;s test site instead of the production version? [[User:Richard Enison|Richard Enison]] 11:02, 15 November 2008 (CST)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=46480</id>
		<title>Installation FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=46480"/>
		<updated>2008-11-08T01:10:55Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* System information needed for Installation problems forum */ added clarifications&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==PHP - is it installed and what version do I have?==&lt;br /&gt;
&lt;br /&gt;
Make a new file on your web site called &#039;&#039;info.php&#039;&#039;, containing the following text, and call it from your browser:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?PHP phpinfo() ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If nothing happens then you don&#039;t have PHP installed or your webserver is not configured to handle .php files properly. See the installation docs for some information about where to download it for your computer. See the [[phpinfo]] page for details about the content of this page.&lt;br /&gt;
&lt;br /&gt;
== System information needed for Installation problems forum ==&lt;br /&gt;
When posting questions to the [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum], try to provide as much background information as possible about your moodle system. Use this template to copy and paste into your post:&lt;br /&gt;
* Server Operating System name (version also if possible): &lt;br /&gt;
* Browser name (version also if possible):&lt;br /&gt;
* Moodle version:&lt;br /&gt;
* Moodle install type? (New/Upgrade):&lt;br /&gt;
* Moodle config.php attached?(Y/N):&lt;br /&gt;
* Phpinfo attached? (Y/N):&lt;br /&gt;
&lt;br /&gt;
For the last two items, try to include the following in your post as an attachment:&lt;br /&gt;
* A copy of your phpinfo output as shown in your browser (see the instructions above for an explanation of how to obtain this, or see [[phpinfo]]).&lt;br /&gt;
* A copy of the Moodle configuration file (with secret info like database password deleted, of course). This is located in the main Moodle directory (by default called moodle), and is named config.php&lt;br /&gt;
&lt;br /&gt;
Copy and paste both of these into a single text file (using vi, Notepad, etc) and attach this to your post. If your PC is a Windows box and config.php looks messy (line breaks missing or in the wrong places) in Notepad, try Wordpad.&lt;br /&gt;
&lt;br /&gt;
If you cannot provide your phpinfo, try to copy &amp;amp; paste and complete these in your post:&lt;br /&gt;
* Webserver (e.g. Apache/IIS) version:&lt;br /&gt;
* Database server (e.g. MySQL, PostgreSQL) version:&lt;br /&gt;
* PHP version:&lt;br /&gt;
&lt;br /&gt;
For installation on web hosting accounts: contact your support desk who should be able to tell you this information.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Security Warning&#039;&#039;&#039;: Make sure you edit any files and delete any passwords before posting onto the forum.&lt;br /&gt;
&lt;br /&gt;
==What &amp;amp; where are Moodle&#039;s configuration settings stored?==&lt;br /&gt;
Configuration settings are stored in the config.php file stored in your moodle folder. This file is created during the installation process. If there is a problem and the installation cannot create the file, you can try creating it manually from the [[Configuration file]] docs. Please remember that manually editing the file is not recommended and may lead to blank pages, especially if there are additional spaces and/or lines after the final php closing tag &amp;quot;?&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Downloading previous releases of Moodle==&lt;br /&gt;
* &#039;&#039;&#039;Generic Packages&#039;&#039;&#039;: If your server does not meet the [[Installing_Moodle#Requirements | requirements]] for the current version of Moodle, you can download previous releases by using wget, lynx or curl with this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
:For example: to download Moodle version 1.5, use http://download.moodle.org/stable15. You&#039;ll see a directory tree with the files displayed. Click on the one you want and download as normal - if you require the latest update of the version, scroll to the end of the list and download the &amp;quot;moodle-latest&amp;quot; file, or alternatively use these URLs for zip or tgz downloads:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].tgz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Changes made in the version in the last month are listed in the &amp;quot;CHANGES&amp;quot; file in the directory listing. The files you download contain Moodle code and are not the Windows or Mac packages - so you need to have a webserver, a database server and PHP already installed. The earliest version available is Moodle 1.3.&lt;br /&gt;
* &#039;&#039;&#039;Windows Packages&#039;&#039;&#039;: To download previous releases of the Moodle packages for Windows, use this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/windows/MoodleWindowsInstaller-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Mac Packages&#039;&#039;&#039;: To download previous releases of the Mac pacakges, use either of these URLs (depending on whether you need the Intel or PPC package):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-Intel-[version_number].dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-PPC-[version_number}.dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Using CVS&#039;&#039;&#039;: You can also use CVS to download older releases and incremental releases of the Moodle generic packages, e.g. Moodle 1.5.4 - see the [[CVS_for_Administrators | CVS documentation]].&lt;br /&gt;
&lt;br /&gt;
== How to enable and check PHP error logs==&lt;br /&gt;
PHP can be set up to log errors in a variety of different ways: two of these involve the use of the php.ini file and the ini_set command. &lt;br /&gt;
* &#039;&#039;&#039;Using the php.ini file&#039;&#039;&#039;: The log settings are contained in the php.ini file stored on the server. If you don&#039;t know where that is, edit your Moodle &#039;&#039;config.php&#039;&#039; and add the following as the second line&lt;br /&gt;
&lt;br /&gt;
  phpinfo();&lt;br /&gt;
&lt;br /&gt;
:then reload the web page. Look for the entry &#039;&#039;&#039;Configuration File (php.ini) Path&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:When you have located php.ini open it in your favorite text editor. Find the &#039;&#039;&#039;Error handling and logging&#039;&#039;&#039; section of the php.ini file. Make sure that both &#039;&#039;&#039;display_errors = On&#039;&#039;&#039;, &#039;&#039;&#039;display_startup_errors = On&#039;&#039;&#039; and &#039;&#039;&#039;log_errors = On&#039;&#039;&#039; are present and uncommented. Check the value of &#039;&#039;&#039;error_log&#039;&#039;&#039; - 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).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Using ini_set commands&#039;&#039;&#039;: If you are using Moodle 1.7 or higher, the previous steps are not enough. In those versions error logging parameters are dependant on certain administrative settings that you specify in the debugging section. The problem is that if you can&#039;t access the administrative pages, you can&#039;t set the debugging options. So the only way to modify them is by adding the following lines to your config.php file, just before the last line (the one containing a single&#039;?&amp;gt;&#039; only):&lt;br /&gt;
&lt;br /&gt;
  ini_set (&#039;display_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;log_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;display_startup_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;error_reporting&#039;, E_ALL);&lt;br /&gt;
  $CFG-&amp;gt;debug = DEBUG_ALL;&lt;br /&gt;
&lt;br /&gt;
:This will enable the same settings specified above even if Moodle sets them otherwise. &lt;br /&gt;
:&#039;&#039;&#039;Important&#039;&#039;&#039;: Remember to put them just before the last line of config.php.&lt;br /&gt;
&lt;br /&gt;
==Email copies are not being sent from my forums==&lt;br /&gt;
&lt;br /&gt;
You &#039;&#039;must&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
Basically, you need to set up a process to regularly call the script &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://yoursite/admin/cron.php&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Please refer to the [[Cron|cron instructions]].&lt;br /&gt;
&lt;br /&gt;
Tips:&lt;br /&gt;
* Try the default settings in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039;. This generally works.&lt;br /&gt;
*Make sure that &#039;&#039;allowuseremailcharset&#039;&#039; in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039; is set to No. Setting this to Yes can cause a problem in some versions of Moodle.&lt;br /&gt;
&lt;br /&gt;
==I can&#039;t log in - I just stay stuck on the login screen==&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;src=bar_sch_nam Norton firewall products].&lt;br /&gt;
&lt;br /&gt;
Another possible cause of this problem is that sessions are not configured properly on the server. You can test this by calling the script &amp;lt;nowiki&amp;gt;http://yourserver/moodle/lib/session-test.php&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are still having problems, read the [[Can_not_log_in | Cannot log in]] page.&lt;br /&gt;
&lt;br /&gt;
==I log in but the login link doesn&#039;t change. I am logged in and can navigate freely.==&lt;br /&gt;
&lt;br /&gt;
Make sure the URL in your &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; setting is exactly the same as the one you are actually using to access the site.&lt;br /&gt;
&lt;br /&gt;
==Uploaded files give &amp;quot;File not found&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
For example: Not Found: The requested URL /moodle/file.php/2/myfile.jpg was not found on this server.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;httpd.conf&#039;&#039;, or to a &#039;&#039;.htaccess&#039;&#039; file in your local directory (see [[Installing Moodle]] for more details):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
Note, this will ONLY work for Apache versions 2.x.&lt;br /&gt;
&lt;br /&gt;
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&#039;t be able to use relative links within HTML resources.&lt;br /&gt;
&lt;br /&gt;
To use this alternative method, you should change the &#039;&#039;slasharguments&#039;&#039; variable. For moodle versions &amp;lt; 1.7, this is located in the Operating System section of &#039;&#039;Administration &amp;gt; Configuration &amp;gt; [[admin/config|Variables]]&#039;&#039;. In later versions, this option is located in &#039;&#039;Site Administration &amp;gt; Server &amp;gt; HTTP&#039;&#039;. You should now be able to access your uploaded files.&lt;br /&gt;
&lt;br /&gt;
==Why are all my pages blank?==&lt;br /&gt;
&lt;br /&gt;
Check the dirroot variable in &#039;&#039;config.php&#039;&#039;. You must use complete, absolute pathnames e.g.&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dirroot = &amp;quot;d:\inetpub\sites\www.yoursite.com\web\moodle&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
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 see [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | How to enable and check PHP error logs]].&lt;br /&gt;
&lt;br /&gt;
To determine if MySQL support is your problem, insert this as the second line in your &#039;&#039;config.php&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
 phpinfo();&lt;br /&gt;
&lt;br /&gt;
then reload the web page. Examine the output closely to see if MySQL is supported. If not look for a package you are missing.&lt;br /&gt;
&lt;br /&gt;
== Why is a particular page blank or incomplete? ==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your web server log files!!&#039;&#039;&#039; &lt;br /&gt;
:If a particular page is blank or incomplete (it doesn&#039;t display the footer), before you do anything else [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | check your error logs]]. Having established that PHP error 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.&lt;br /&gt;
&lt;br /&gt;
*If you are &#039;&#039;&#039;upgrading to a new version of Moodle&#039;&#039;&#039;, check that you do not have an old version of a non-standard block or module installed. Remove any such blocks or modules installed using the admin settings page and start the install process again. However, do also make sure that you have included all optional plugins that were required by your courses. &lt;br /&gt;
&lt;br /&gt;
*If you &#039;&#039;&#039;do not see any blocks listed&#039;&#039;&#039;, turn editing on and remove any blocks that you have added to that page and try reloading.&lt;br /&gt;
&lt;br /&gt;
*You may get this error immediately after &#039;&#039;&#039;selecting a language&#039;&#039;&#039;. At this stage of the installation process your Moodle computer may need to connect to the Internet and download a language pack, so check that the computer can access the Internet by using a browser. Check also that your PHP settings are as given in the Moodle [[Installing_Moodle#Requirements | Moodle Requirements]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=97734 PHP configuration error] forum discussion  &lt;br /&gt;
&lt;br /&gt;
==Installation hangs when setting-up database tables==&lt;br /&gt;
Sometimes the installation will hang when setting up tables. This will be an abrupt hang with half the page displayed in the browser and/or other outputs removed. Examples are:&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Truncated MySQL statements&#039;&#039;&#039;:&lt;br /&gt;
 &lt;br /&gt;
 (mysql): SET NAMES &#039;utf8&#039;&lt;br /&gt;
 --------------------------------------------------------------------------------&lt;br /&gt;
 (mysql): SHOW LOCAL VARIABLES LIKE &#039;character_set_database&#039;&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 (no more statements are displayed)   &lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Missing Continue button&#039;&#039;&#039;: The “Scroll to continue” link is displayed but no “Continue” button is there. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: There is an exception to this when upgrading an existing database and the installation may appear to hang at the roles generation phase. This process can take a very long time - so please be patient.&lt;br /&gt;
&lt;br /&gt;
Below are some solutions you can try to overcome this problem:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check for MySQL limits&#039;&#039;&#039;. This is often a MySQL error and not a php error. Check that there is no limit placed on your mysql database, e.g. a &amp;quot;questions&amp;quot; limit. See [http://dev.mysql.com/doc/refman/5.0/en/user-resources.html Limiting Account Resources in the MySQL manual].&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your .htaccess files&#039;&#039;&#039;. If the install is on a webhost, adding the following line to the .htaccess file in the Moodle directory has been known to solve the problem.&lt;br /&gt;
 AddType x-mapp-php5 .php&lt;br /&gt;
&lt;br /&gt;
:Try also renaming the .htaccess file so that it is disabled.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Code customizations&#039;&#039;&#039;. You may also want to look and see if you&#039;ve customized any of your code.  Look at the last successful table, and then look at the block, mod, or other code that is referenced by that table.  For example, if your install hangs and continues to say that the forum tables were successful as the last message, look at /mod/forum/ for any custom code.  If you have customized code, backup those files and replace with the correct files.  You can then restart the install by renaming config.php or reinstalling your database from the backup.  If your install is successful, you can make your code changes back into the stock Moodle code.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your memory limit&#039;&#039;&#039;. It may also be that the &amp;quot;memory_limit&amp;quot; in your php.ini is set too low. Please check your php.ini file and allocate the recommended amount (see [https://docs.moodle.org/en/Installing_Moodle#Requirements Moodle requirements]). For Moodle version 1.8 and above at least 40MB is  recommended.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Upgrade incrementally&#039;&#039;&#039;. To avoid this problem when upgrading, it is recommended to upgrade via each version of Moodle, for example 1.7 -&amp;gt; 1.8 -&amp;gt; 1.9 (with the exception of upgrading from 1.5 or 1.6, when it is recommended that 1.7 be skipped, in other words upgrade 1.5 -&amp;gt; 1.6 -&amp;gt; 1.8 -&amp;gt; 1.9).&lt;br /&gt;
&lt;br /&gt;
A work-around to this problem is to setup a working Moodle system on your local PC or server using the [http://download.moodle.org Moodle Packages]. Once you have a running Moodle, [https://docs.moodle.org/en/Upgrading_Moodle#Backup_important_data backup the database] and import to your webhost. Then backup the Moodle code itself (the &amp;quot;moodle&amp;quot; directory on your PC) and copy this to your webhost using (for example) FTP. Finally, edit the moodle/config.php file for the new settings that have to be changed for the webhost.&lt;br /&gt;
&lt;br /&gt;
==Why can&#039;t I upload a new image into my profile?==&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see anything on your user profile pages to let you upload user images then it&#039;s usually because GD is not enabled on your server. GD is a library that allows image processing.&lt;br /&gt;
&lt;br /&gt;
1. Make sure &#039;&#039;&#039;GD has been included in your PHP installation&#039;&#039;&#039;. You can check this by going into Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[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.&lt;br /&gt;
&lt;br /&gt;
2. If Moodle thinks GD is not installed, then you will need to &#039;&#039;&#039;install the GD library&#039;&#039;&#039;. &lt;br /&gt;
*On Unix you may need to re-compile PHP with arguments something like this:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-gd &lt;br /&gt;
 --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-ttf --enable-gd-native-ttf &lt;br /&gt;
 --enable-magic-quotes --with-mysql --enable-sockets --enable-track-vars &lt;br /&gt;
 --enable-versioning --with-zlib&lt;br /&gt;
&lt;br /&gt;
* On Windows this is usually a matter of &amp;quot;turning on&amp;quot; the extension in PHP by editing your php.ini file. To do this remove the semicolon for the php_gd2.dll extension - check that this file is actually present in your php extensions  folder first (search your php.ini for extension_dir to determine where this points to on your hard disk). You should then have a line that looks like this:&lt;br /&gt;
 extension=php_gd2.dll&lt;br /&gt;
&lt;br /&gt;
:Windows users should see the [[Installing AMP|installation instructions]] for further help. &lt;br /&gt;
&lt;br /&gt;
3. Remember to &#039;&#039;&#039;restart your webserver&#039;&#039;&#039; (if possible) and re-visit the Moodle configuration page after making any changes to PHP so it can pick up the correct version of GD.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=44271 Profile pictures] for additional information.&lt;br /&gt;
&lt;br /&gt;
== Why doesn&#039;t my Moodle site display the time and date correctly? ==&lt;br /&gt;
&lt;br /&gt;
Each language requires a specific language code (called a &#039;&#039;&#039;locale&#039;&#039;&#039; code) to allow dates to be displayed correctly. The language packs contain default standard codes, but sometimes these don&#039;t work on Windows servers.&lt;br /&gt;
&lt;br /&gt;
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. &amp;quot;esp_esp&amp;quot; for spanish)&lt;br /&gt;
&lt;br /&gt;
These new locale codes can be entered on the Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]] page, where they override the ones in the currently chosen language pack.&lt;br /&gt;
&lt;br /&gt;
==How do I uninstall Moodle?==&lt;br /&gt;
&#039;&#039;&#039;Moodle package installation&#039;&#039;&#039;: If you have downloaded a Moodle package, simply uninstall using your system commands. On Windows PCs, you should access the Control Panel -&amp;gt; Add/Remove Programs. Select the package name and click Change or Remove Programs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Webhost/manual installation&#039;&#039;&#039;: If you have installed Moodle manually or have installed onto a webhost, follow these steps:&lt;br /&gt;
*Delete the moodle database using this mysql command (or delete using your mysql client, e.g. PHPMyAdmin):&lt;br /&gt;
&amp;lt;pre&amp;gt;sql&amp;gt;DROP DATABASE moodle;&amp;lt;/pre&amp;gt;&lt;br /&gt;
:In the above example replace &#039;moodle&#039; with the name of the moodle database you created when installing.&lt;br /&gt;
*Delete the moodledata directory. If you, or your users, have uploaded materials into this directory take a copy of these before deleting this directory.&lt;br /&gt;
*Delete the moodle directory itself. This will delete all of the moodle PHP script files.&lt;br /&gt;
&lt;br /&gt;
==How do I upgrade Moodle? Do I just overwrite the files?==&lt;br /&gt;
Do not overwrite files, it may cause strange errors. You should read the [[Upgrade]] documentation before proceeding.&lt;br /&gt;
&lt;br /&gt;
==Migrating Moodle to a new site or server==&lt;br /&gt;
Migrating Moodle means that you have to move the current installation to a new server, and so may have to change IP addresses or DNS entries. To do this you will need to change the $CFG-&amp;gt;wwwroot value in the config.php on the new server. You will also have to change any absolute links stored in the database backup file (before restoring the file on the new server) either using the admin/replace.php script, your text editor or another &amp;quot;search and replace&amp;quot; tool, e.g. sed. For more details see the [[Moodle_migration | Moodle Migration]] page.&lt;br /&gt;
&lt;br /&gt;
==Why does my new installation display correctly on the server, but when I view it from a different machine, styles and images are missing?==&lt;br /&gt;
In the installation instructions, one of the suggested settings for &#039;webroot&#039; is &#039;localhost&#039;. This is fine if all you want to do is some local testing of your new Moodle installation. If, however, you want to view your new installation from another machine on the same local area network, or view your site on the internet, you will have to change this setting:&lt;br /&gt;
*For local testing, &#039;localhost&#039; is fine for the webroot ($CFG-&amp;gt;wwwroot in config.php). &lt;br /&gt;
*If you want to test your site from other machines on the same local area network (LAN), then you will have to use the private ip address of the serving machine, (e.g. 192.168.1.2/moodle) or the network name of the serving computer (e.g. network_name_of_serving_machine/moodle) as the web root. Depending on your LAN setup, it may be better to use the network name of the computer rather than its (private) ip address, because the ip address can and will change from time to time. If you don&#039;t want to use the network name, then you will have to speak to your network administrator and have them assign a permanent ip address to the serving machine.&lt;br /&gt;
*Finally, if you want to test your new installation across the internet, you will have to use either a domain name or a permanent (public) ip address/moodle as your web root. To handle both types of access, see [https://docs.moodle.org/en/masquerading masquerading].&lt;br /&gt;
&lt;br /&gt;
==Maximum upload file size - how to change it?==&lt;br /&gt;
There are several places to change the maximum file upload size. The first place to check is the Administration block.   Security -&amp;gt; Site Policies -&amp;gt; and look for &amp;quot;Maximum Uploaded File Size&amp;quot;.  This is the &amp;quot;maxbyte&amp;quot; variable found in older versions of Moodle (under Admin &amp;gt; Variables). Teachers may also set the maximum file size by the [[Course_settings#Maximum_upload_size|course administration block]].&lt;br /&gt;
&lt;br /&gt;
The second place to check are the server files.  The php.ini file has a limit which will override any other setting. (Hint: remember to restart your server for changes to take effect).  For more help see:&lt;br /&gt;
*[[Administration_FAQ#How_do_the_limits_on_uploaded_files_work.3F]]&lt;br /&gt;
*[[Installing_Moodle#Recheck_PHP_settings]]&lt;br /&gt;
*[[Installing_Moodle#Using_a_.htaccess_file_for_webserver_and_PHP_settings]]&lt;br /&gt;
*[[Site_policies#Maximum_uploaded_file_size]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Errors FAQ]]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:FAQ Instalación]]&lt;br /&gt;
[[fr:FAQ d&#039;installation]]&lt;br /&gt;
[[nl:Installatie FAQ]]&lt;br /&gt;
[[ja:インストールFAQ]]&lt;br /&gt;
[[ru:Установка FAQ]]&lt;br /&gt;
[[pl:Instalacja FAQ]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installing_Moodle_on_Windows_Vista&amp;diff=46034</id>
		<title>Installing Moodle on Windows Vista</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installing_Moodle_on_Windows_Vista&amp;diff=46034"/>
		<updated>2008-11-02T12:59:34Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: corrected grammar and typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Many people tried to install Moodle on Windows Vista, but got a blank screen after database config. This is due to some Vista permission issue.&lt;br /&gt;
This method is from a Moodle forum and might help Moodle installation.&lt;br /&gt;
&lt;br /&gt;
1. Create a &amp;quot;moodledata&amp;quot; directory somewhere on your PC ( May be c:\wwwroot\moodledata  )&lt;br /&gt;
Not sure if this step is needed, but it worked.&lt;br /&gt;
&lt;br /&gt;
   1. Right-click on the folder moodledata, select Properties, then select the Security tab.&lt;br /&gt;
   2. Click on &amp;quot;Everyone&amp;quot; (&amp;quot;Users&amp;quot; on some machines) in the top window (Group or User Names)&lt;br /&gt;
 then click Edit.&lt;br /&gt;
   3. Check to allow read and write permissions for Everyone (List folder contents and Read &amp;amp;&lt;br /&gt;
 Execute should already be checked)&lt;br /&gt;
&lt;br /&gt;
2. Create config.php in your main Moodle directory&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;?php /// Moodle Configuration File&lt;br /&gt;
   &lt;br /&gt;
   unset($CFG);&lt;br /&gt;
   &lt;br /&gt;
   $CFG-&amp;gt;dbtype = &#039;mysql&#039;; //Database Type&lt;br /&gt;
   $CFG-&amp;gt;dbhost = &#039;localhost&#039;; //Database Host&lt;br /&gt;
   $CFG-&amp;gt;dbname = &#039;moodle&#039;; //Database Name&lt;br /&gt;
   $CFG-&amp;gt;dbuser = &#039;root&#039;; //Database User&lt;br /&gt;
   $CFG-&amp;gt;dbpass = &#039;&#039;; //Database Password&lt;br /&gt;
   $CFG-&amp;gt;dbpersist = false;&lt;br /&gt;
   $CFG-&amp;gt;prefix = &#039;mdl_&#039;; //Table Prefix&lt;br /&gt;
   &lt;br /&gt;
   $CFG-&amp;gt;wwwroot = &amp;lt;nowiki&amp;gt;&#039;http://localhost/moodle&#039;&amp;lt;/nowiki&amp;gt;; //Location where moodle is accessed&lt;br /&gt;
   $CFG-&amp;gt;dirroot = &#039;C:\wwwroot\moodle&#039;; //Directory of Moodle&lt;br /&gt;
   $CFG-&amp;gt;dataroot = &#039;C:\moodledata&#039;; //Directory of moodledata folder (Created in step 1,&lt;br /&gt;
                                     //should be inaccessible through HTTP)&lt;br /&gt;
   $CFG-&amp;gt;admin = &#039;admin&#039;;&lt;br /&gt;
   &lt;br /&gt;
   $CFG-&amp;gt;directorypermissions = 00777; // try 02777 on a server in Safe Mode&lt;br /&gt;
   &lt;br /&gt;
   $CFG-&amp;gt;unicodedb = true; // If Database is utf8&lt;br /&gt;
   &lt;br /&gt;
   require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
   // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
   // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
   ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Go to your browser and type your moodle URL. You should get a screen that allows you to continue installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Alternative Installation method ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have had any issues installing Moodle on Windows Vista this may be a solution for you.&lt;br /&gt;
This was performed on a Vista Laptop running the Business Edition of Vista.&lt;br /&gt;
&lt;br /&gt;
This solution uses XAMPP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Go to this URL and download the latest version for Windows: http://download.moodle.org/windows/&lt;br /&gt;
&lt;br /&gt;
2. This package includes XAMPP. I unzipped my package into C:\moodle19\ . Then start Moodle by going to C:\Moodle19\ and selecting &amp;quot;Start Moodle&amp;quot;. After it completes, select &amp;quot;Stop Moodle&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing I have noted, after you do this the first time, is that it is easier on further occasions to create a shortcut on the desktop to &amp;quot;xampp-control&amp;quot; and another to &amp;quot;xampp_stop&amp;quot; (both in the server folder). You use xampp-control to start Apache and Mysql. You can use xampp_stop, should anything fall over (which occasionally does on my version.. Suspect it is a problem with Vista and Xampp??)&lt;br /&gt;
&lt;br /&gt;
3. Start Apache and MySql and then go to your browser and type : &amp;lt;nowiki&amp;gt;http://127.0.0.1/&amp;lt;/nowiki&amp;gt; . Follow the online guide. (This is how I got around the permissions issue described in the instructions above). &lt;br /&gt;
&lt;br /&gt;
4. Once setup is complete, modify the file located in Server/moodle  called config.php. Adjust the line&lt;br /&gt;
&lt;br /&gt;
    $CFG-&amp;gt;wwwroot = &amp;lt;nowiki&amp;gt;&#039;http://127.0.0.1&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to &lt;br /&gt;
&lt;br /&gt;
    $CFG-&amp;gt;wwwroot = &amp;lt;nowiki&amp;gt;&#039;http://localhost&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. I noted on my install the following: From the Xampp Control Panel, it shows a &#039;Directory Mismatch error&#039;.&lt;br /&gt;
This is fixed by using the guide provided here:&lt;br /&gt;
&lt;br /&gt;
   All you have to do is open the registry editor (start ---&amp;gt; run ---&amp;gt; type regedit then&lt;br /&gt;
 enter). Navigate to HKEY_LOCAL_MACHINE\SOFTWARE.    &lt;br /&gt;
   Right-click on SOFTWARE and Choose New ---&amp;gt; Key. Then, type XAMPP, then click OK. Navigate&lt;br /&gt;
 to the XAMPP Key you just created, then right  click on the right column (anywhere in the&lt;br /&gt;
 big white space) then again, New ---&amp;gt; String Value. Name it Install_Dir (probably case&lt;br /&gt;
 sensitive!) then hit Enter. Double click this value and in the appropriate box, type the&lt;br /&gt;
 path of your current XAMPP installation (E:\xampp in our case).  &lt;br /&gt;
   Close the registry and restart the Control Panel and you&#039;re ready to start. &lt;br /&gt;
&lt;br /&gt;
6. Finally, to ensure you site gets all the images, Site Administration -&amp;gt; Miscellaneous -&amp;gt; Experimental -&amp;gt; Smart Pix Search (Selected)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=73852 Installing on Windows Vista] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Installation sur Windows Vista]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Ubuntu_using_apt-get&amp;diff=45474</id>
		<title>Step-by-step Install Guide for Ubuntu using apt-get</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Ubuntu_using_apt-get&amp;diff=45474"/>
		<updated>2008-10-18T14:52:03Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Allow access to your Moodle from other computers */ fixed making http:// a link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This install option will be useful for someone who is doing a new install on an ubuntu server install using APT. The Advanced packaging tool (APT) is a user interface that helps installing software on a Linux operating system.&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
&lt;br /&gt;
We assume that: &lt;br /&gt;
&lt;br /&gt;
# Ubuntu is installed on the site and you have administrative rights.&lt;br /&gt;
# The site used the apt-get update and apt-get upgrade to get the latest version.&lt;br /&gt;
# The site has a typical ubuntu server edition which just gives the command line.&lt;br /&gt;
# The site has not enabled the root account and does not want to do that. &lt;br /&gt;
# The site opted to have a LAMP installed and a mailserver.&lt;br /&gt;
# The system administrator does not mind that the Moodle site will be at the package maintainers current state which may not be in line with the latest build from the moodle site. This is very unlikely to be a problem if you are installing a new Moodle.&lt;br /&gt;
&lt;br /&gt;
*Tip: If you do not like the last assumption [[Step-by-step Install Guide for Ubuntu]] describes how to do a manual installation of Moodle on Ubuntu.&lt;br /&gt;
&lt;br /&gt;
==Doing the installation==&lt;br /&gt;
&lt;br /&gt;
First, from the terminal type &lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install moodle&lt;br /&gt;
&lt;br /&gt;
During the process that follows you will be asked for some names and passwords for the mysql and moodle accounts. This information is used to populate the config.php file.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
You can do this from a remote terminal but bear in mind that if you are using a remote terminal then it needs to be an reasonably capable one. Otherwise the installation dialog may not be able to talk to you and you will get an error which mentions the limitations of your terminal. &lt;br /&gt;
&lt;br /&gt;
One terminal that does work is the X terminal on a mac. (Not the terminal program that comes with a mac in the utilities folder but the Xterm that you will have if you installed open office).&lt;br /&gt;
&lt;br /&gt;
==Configuration changes==&lt;br /&gt;
&lt;br /&gt;
===Allow access to your Moodle from other computers===&lt;br /&gt;
&lt;br /&gt;
This moodle install will only work from the localhost. To make it accessible from other hosts you must edit the file /etc/apache2/conf.d/moodle. Type&lt;br /&gt;
&lt;br /&gt;
 sudo nano /etc/apache2/conf.d/moodle&lt;br /&gt;
&lt;br /&gt;
(This is actually a soft link from /etc/moodle/apache.conf). This fires up the &#039;nano&#039; text editor which is command line text editor and the sudo gives you the write access you need.&lt;br /&gt;
&lt;br /&gt;
About 10 lines down you see the following line&lt;br /&gt;
&lt;br /&gt;
 #allow from all&lt;br /&gt;
&lt;br /&gt;
The # indicates it is commented out, so remove the # and use CTRL+O to save the file.&lt;br /&gt;
&lt;br /&gt;
Now restart apache by typing&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/apache2 restart&lt;br /&gt;
&lt;br /&gt;
in the terminal. You should now be able to access the moodle from other hosts by doing &amp;lt;nowiki&amp;gt;http://&amp;lt;address of your moodle host&amp;gt;/moodle&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Upgrading your installation==&lt;br /&gt;
&lt;br /&gt;
One big advantage of installing Moodle this way is that you can upgrade it just be typing&lt;br /&gt;
          &lt;br /&gt;
 sudo apt-get upgrade.&lt;br /&gt;
&lt;br /&gt;
in a terminal.&lt;br /&gt;
&lt;br /&gt;
==Notes and comments==&lt;br /&gt;
&lt;br /&gt;
The installation is actually rather better thought out than many installs. For example the apache2 conf file is nicely done.&lt;br /&gt;
&lt;br /&gt;
These are the file locations for a default install from apt-get&lt;br /&gt;
* moodle site is at /usr/share/moodle&lt;br /&gt;
* moodle data folder is at /var/lib/data&lt;br /&gt;
* config.php is a soft link in the /usr/share/moodle folder and actually sits in /etc/moodle&lt;br /&gt;
&lt;br /&gt;
The file permissions for the site and data folder are:&lt;br /&gt;
* user = root, group = root for the site folder,&lt;br /&gt;
* user = www-data and group = www-data for the data folder.&lt;br /&gt;
&lt;br /&gt;
These instructions were written and tested on 27th August 2008 using an up to date install of ubuntu server 64 bit (hardy) on a HP Blade (Dual quad Xeon with 32G ram).&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step Install Guide for Ubuntu]] - doing a manual installation on Ubuntu.&lt;br /&gt;
* [[Administrator documentation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=45446</id>
		<title>Installation FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=45446"/>
		<updated>2008-10-17T06:53:20Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Installation hangs when setting-up database tables */ corrected grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==PHP - is it installed and what version do I have?==&lt;br /&gt;
&lt;br /&gt;
Make a new file on your web site called &#039;&#039;info.php&#039;&#039;, containing the following text, and call it from your browser:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?PHP phpinfo() ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If nothing happens then you don&#039;t have PHP installed or your webserver is not configured to handle .php files properly. See the installation docs for some information about where to download it for your computer. See the [[phpinfo]] page for details about the content of this page.&lt;br /&gt;
&lt;br /&gt;
== System information needed for Installation problems forum ==&lt;br /&gt;
When posting questions to the [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum], try to provide as much background information as possible about your moodle system. Use this template to copy and paste into your post:&lt;br /&gt;
* Server Operating System name (version also if possible): &lt;br /&gt;
* Browser name (version also if possible):&lt;br /&gt;
* Moodle version:&lt;br /&gt;
* Moodle install type? (New/Upgrade):&lt;br /&gt;
* Moodle config.php attached?(Y/N):&lt;br /&gt;
* Phpinfo attached? (Y/N):&lt;br /&gt;
&lt;br /&gt;
For the last two items, try to include the following in your post as an attachment:&lt;br /&gt;
* A copy of your phpinfo output as shown in your browser (see the instructions above for an explanation of how to obtain this).&lt;br /&gt;
* A copy of the Moodle configuration file. This is located in the directory moodle and is named config.php&lt;br /&gt;
&lt;br /&gt;
Copy and paste both of these into a single text file (using vi, Notepad, etc) and attach this to your post.&lt;br /&gt;
&lt;br /&gt;
If you cannot provide your phpinfo, try to copy &amp;amp; paste and complete these in your post:&lt;br /&gt;
* Webserver (e.g. Apache/IIS) version:&lt;br /&gt;
* Database server (e.g. MySQL, PostgreSQL) version:&lt;br /&gt;
* PHP version:&lt;br /&gt;
&lt;br /&gt;
For installation on web hosting accounts: contact your support desk who should be able to tell you this information.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Security Warning&#039;&#039;&#039;: Make sure you edit any files and delete any passwords before posting onto the forum.&lt;br /&gt;
&lt;br /&gt;
==What &amp;amp; where are Moodle&#039;s configuration settings stored?==&lt;br /&gt;
Configuration settings are stored in the config.php file stored in your moodle folder. This file is created during the installation process. If there is a problem and the installation cannot create the file, you can try creating it manually from the [[Configuration file]] docs. Please remember that manually editing the file is not recommended and may lead to blank pages, especially if there are additional spaces and/or lines after the final php closing tag &amp;quot;?&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Downloading previous releases of Moodle==&lt;br /&gt;
* &#039;&#039;&#039;Generic Packages&#039;&#039;&#039;: If your server does not meet the [[Installing_Moodle#Requirements | requirements]] for the current version of Moodle, you can download previous releases by using wget, lynx or curl with this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
:For example: to download Moodle version 1.5, use http://download.moodle.org/stable15. You&#039;ll see a directory tree with the files displayed. Click on the one you want and download as normal - if you require the latest update of the version, scroll to the end of the list and download the &amp;quot;moodle-latest&amp;quot; file, or alternatively use these URLs for zip or tgz downloads:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].tgz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Changes made in the version in the last month are listed in the &amp;quot;CHANGES&amp;quot; file in the directory listing. The files you download contain Moodle code and are not the Windows or Mac packages - so you need to have a webserver, a database server and PHP already installed. The earliest version available is Moodle 1.3.&lt;br /&gt;
* &#039;&#039;&#039;Windows Packages&#039;&#039;&#039;: To download previous releases of the Moodle packages for Windows, use this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/windows/MoodleWindowsInstaller-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Mac Packages&#039;&#039;&#039;: To download previous releases of the Mac pacakges, use either of these URLs (depending on whether you need the Intel or PPC package):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-Intel-[version_number].dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-PPC-[version_number}.dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Using CVS&#039;&#039;&#039;: You can also use CVS to download older releases and incremental releases of the Moodle generic packages, e.g. Moodle 1.5.4 - see the [[CVS_for_Administrators | CVS documentation]].&lt;br /&gt;
&lt;br /&gt;
== How to enable and check PHP error logs==&lt;br /&gt;
PHP can be set up to log errors in a variety of different ways: two of these involve the use of the php.ini file and the ini_set command. &lt;br /&gt;
* &#039;&#039;&#039;Using the php.ini file&#039;&#039;&#039;: The log settings are contained in the php.ini file stored on the server. If you don&#039;t know where that is, edit your Moodle &#039;&#039;config.php&#039;&#039; and add the following as the second line&lt;br /&gt;
&lt;br /&gt;
  phpinfo();&lt;br /&gt;
&lt;br /&gt;
:then reload the web page. Look for the entry &#039;&#039;&#039;Configuration File (php.ini) Path&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:When you have located php.ini open it in your favorite text editor. Find the &#039;&#039;&#039;Error handling and logging&#039;&#039;&#039; section of the php.ini file. Make sure that both &#039;&#039;&#039;display_errors = On&#039;&#039;&#039;, &#039;&#039;&#039;display_startup_errors = On&#039;&#039;&#039; and &#039;&#039;&#039;log_errors = On&#039;&#039;&#039; are present and uncommented. Check the value of &#039;&#039;&#039;error_log&#039;&#039;&#039; - 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).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Using ini_set commands&#039;&#039;&#039;: If you are using Moodle 1.7 or higher, the previous steps are not enough. In those versions error logging parameters are dependant on certain administrative settings that you specify in the debugging section. The problem is that if you can&#039;t access the administrative pages, you can&#039;t set the debugging options. So the only way to modify them is by adding the following lines to your config.php file, just before the last line (the one containing a single&#039;?&amp;gt;&#039; only):&lt;br /&gt;
&lt;br /&gt;
  ini_set (&#039;display_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;log_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;display_startup_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;error_reporting&#039;, E_ALL);&lt;br /&gt;
  $CFG-&amp;gt;debug = DEBUG_ALL;&lt;br /&gt;
&lt;br /&gt;
:This will enable the same settings specified above even if Moodle sets them otherwise. &lt;br /&gt;
:&#039;&#039;&#039;Important&#039;&#039;&#039;: Remember to put them just before the last line of config.php.&lt;br /&gt;
&lt;br /&gt;
==Email copies are not being sent from my forums==&lt;br /&gt;
&lt;br /&gt;
You &#039;&#039;must&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
Basically, you need to set up a process to regularly call the script &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://yoursite/admin/cron.php&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Please refer to the [[Cron|cron instructions]].&lt;br /&gt;
&lt;br /&gt;
Tips:&lt;br /&gt;
* Try the default settings in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039;. This generally works.&lt;br /&gt;
*Make sure that &#039;&#039;allowuseremailcharset&#039;&#039; in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039; is set to No. Setting this to Yes can cause a problem in some versions of Moodle.&lt;br /&gt;
&lt;br /&gt;
==I can&#039;t log in - I just stay stuck on the login screen==&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;src=bar_sch_nam Norton firewall products].&lt;br /&gt;
&lt;br /&gt;
Another possible cause of this problem is that sessions are not configured properly on the server. You can test this by calling the script &amp;lt;nowiki&amp;gt;http://yourserver/moodle/lib/session-test.php&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are still having problems, read the [[Can_not_log_in | Cannot log in]] page.&lt;br /&gt;
&lt;br /&gt;
==I log in but the login link doesn&#039;t change. I am logged in and can navigate freely.==&lt;br /&gt;
&lt;br /&gt;
Make sure the URL in your &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; setting is exactly the same as the one you are actually using to access the site.&lt;br /&gt;
&lt;br /&gt;
==Uploaded files give &amp;quot;File not found&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
For example: Not Found: The requested URL /moodle/file.php/2/myfile.jpg was not found on this server.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;httpd.conf&#039;&#039;, or to a &#039;&#039;.htaccess&#039;&#039; file in your local directory (see [[Installing Moodle]] for more details):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
Note, this will ONLY work for Apache versions 2.x.&lt;br /&gt;
&lt;br /&gt;
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&#039;t be able to use relative links within HTML resources.&lt;br /&gt;
&lt;br /&gt;
To use this alternative method, you should change the &#039;&#039;slasharguments&#039;&#039; variable. For moodle versions &amp;lt; 1.7, this is located in the Operating System section of &#039;&#039;Administration &amp;gt; Configuration &amp;gt; [[admin/config|Variables]]&#039;&#039;. In later versions, this option is located in &#039;&#039;Site Administration &amp;gt; Server &amp;gt; HTTP&#039;&#039;. You should now be able to access your uploaded files.&lt;br /&gt;
&lt;br /&gt;
==Why are all my pages blank?==&lt;br /&gt;
&lt;br /&gt;
Check the dirroot variable in &#039;&#039;config.php&#039;&#039;. You must use complete, absolute pathnames e.g.&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dirroot = &amp;quot;d:\inetpub\sites\www.yoursite.com\web\moodle&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
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 see [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | How to enable and check PHP error logs]].&lt;br /&gt;
&lt;br /&gt;
To determine if MySQL support is your problem, insert this as the second line in your &#039;&#039;config.php&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
 phpinfo();&lt;br /&gt;
&lt;br /&gt;
then reload the web page. Examine the output closely to see if MySQL is supported. If not look for a package you are missing.&lt;br /&gt;
&lt;br /&gt;
== Why is a particular page blank or incomplete? ==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your web server log files!!&#039;&#039;&#039; &lt;br /&gt;
:If a particular page is blank or incomplete (it doesn&#039;t display the footer), before you do anything else [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | check your error logs]]. Having established that PHP error 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.&lt;br /&gt;
&lt;br /&gt;
*If you are &#039;&#039;&#039;upgrading to a new version of Moodle&#039;&#039;&#039;, check that you do not have an old version of a non-standard block or module installed. Remove any such blocks or modules installed using the admin settings page and start the install process again. However, do also make sure that you have included all optional plugins that were required by your courses. &lt;br /&gt;
&lt;br /&gt;
*If you &#039;&#039;&#039;do not see any blocks listed&#039;&#039;&#039;, turn editing on and remove any blocks that you have added to that page and try reloading.&lt;br /&gt;
&lt;br /&gt;
*You may get this error immediately after &#039;&#039;&#039;selecting a language&#039;&#039;&#039;. At this stage of the installation process your Moodle computer may need to connect to the Internet and download a language pack, so check that the computer can access the Internet by using a browser. Check also that your PHP settings are as given in the Moodle [[Installing_Moodle#Requirements | Moodle Requirements]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=97734 PHP configuration error] forum discussion  &lt;br /&gt;
&lt;br /&gt;
==Installation hangs when setting-up database tables==&lt;br /&gt;
Sometimes the installation will hang when setting up tables. This will be an abrupt hang with half the page displayed in the browser and/or other outputs removed. Examples are:&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Truncated MySQL statements&#039;&#039;&#039;:&lt;br /&gt;
 &lt;br /&gt;
 (mysql): SET NAMES &#039;utf8&#039;&lt;br /&gt;
 --------------------------------------------------------------------------------&lt;br /&gt;
 (mysql): SHOW LOCAL VARIABLES LIKE &#039;character_set_database&#039;&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 (no more statements are displayed)   &lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Missing Continue button&#039;&#039;&#039;: The “Scroll to continue” link is displayed but no “Continue” button is there. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: There is an exception to this when upgrading an existing database and the installation may appear to hang at the roles generation phase. This process can take a very long time - so please be patient.&lt;br /&gt;
&lt;br /&gt;
Below are some solutions you can try to overcome this problem:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check for MySQL limits&#039;&#039;&#039;. This is often a MySQL error and not a php error. Check that there is no limit placed on your mysql database, e.g. a &amp;quot;questions&amp;quot; limit. See [http://dev.mysql.com/doc/refman/5.0/en/user-resources.html Limiting Account Resources in the MySQL manual].&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your .htaccess files&#039;&#039;&#039;. If the install is on a webhost, adding the following line to the .htaccess file in the Moodle directory has been known to solve the problem.&lt;br /&gt;
 AddType x-mapp-php5 .php&lt;br /&gt;
&lt;br /&gt;
:Try also renaming the .htaccess file so that it is disabled.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Code customizations&#039;&#039;&#039;. You may also want to look and see if you&#039;ve customized any of your code.  Look at the last successful table, and then look at the block, mod, or other code that is referenced by that table.  For example, if your install hangs and continues to say that the forum tables were successful as the last message, look at /mod/forum/ for any custom code.  If you have customized code, backup those files and replace with the correct files.  You can then restart the install by renaming config.php or reinstalling your database from the backup.  If your install is successful, you can make your code changes back into the stock Moodle code.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your memory limit&#039;&#039;&#039;. It may also be that the &amp;quot;memory_limit&amp;quot; in your php.ini is set too low. Please check your php.ini file and allocate the recommended amount (see [https://docs.moodle.org/en/Installing_Moodle#Requirements Moodle requirements]). For Moodle version 1.8 and above at least 40MB is  recommended.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Upgrade incrementally&#039;&#039;&#039;. To avoid this problem when upgrading, it is recommended to upgrade via each version of Moodle, for example 1.7 -&amp;gt; 1.8 -&amp;gt; 1.9 (with the exception of upgrading from 1.5 or 1.6, when it is recommended that 1.7 be skipped, in other words upgrade 1.5 -&amp;gt; 1.6 -&amp;gt; 1.8 -&amp;gt; 1.9).&lt;br /&gt;
&lt;br /&gt;
A work-around to this problem is to setup a working Moodle system on your local PC or server using the [http://download.moodle.org Moodle Packages]. Once you have a running Moodle, [https://docs.moodle.org/en/Upgrading_Moodle#Backup_important_data backup the database] and import to your webhost. Then backup the Moodle code itself (the &amp;quot;moodle&amp;quot; directory on your PC) and copy this to your webhost using (for example) FTP. Finally, edit the moodle/config.php file for the new settings that have to be changed for the webhost.&lt;br /&gt;
&lt;br /&gt;
==Why can&#039;t I upload a new image into my profile?==&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see anything on your user profile pages to let you upload user images then it&#039;s usually because GD is not enabled on your server. GD is a library that allows image processing.&lt;br /&gt;
&lt;br /&gt;
1. Make sure &#039;&#039;&#039;GD has been included in your PHP installation&#039;&#039;&#039;. You can check this by going into Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[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.&lt;br /&gt;
&lt;br /&gt;
2. If Moodle thinks GD is not installed, then you will need to &#039;&#039;&#039;install the GD library&#039;&#039;&#039;. &lt;br /&gt;
*On Unix you may need to re-compile PHP with arguments something like this:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-gd &lt;br /&gt;
 --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-ttf --enable-gd-native-ttf &lt;br /&gt;
 --enable-magic-quotes --with-mysql --enable-sockets --enable-track-vars &lt;br /&gt;
 --enable-versioning --with-zlib&lt;br /&gt;
&lt;br /&gt;
* On Windows this is usually a matter of &amp;quot;turning on&amp;quot; the extension in PHP by editing your php.ini file. To do this remove the semicolon for the php_gd2.dll extension - check that this file is actually present in your php extensions  folder first (search your php.ini for extension_dir to determine where this points to on your hard disk). You should then have a line that looks like this:&lt;br /&gt;
 extension=php_gd2.dll&lt;br /&gt;
&lt;br /&gt;
:Windows users should see the [[Installing AMP|installation instructions]] for further help. &lt;br /&gt;
&lt;br /&gt;
3. Remember to &#039;&#039;&#039;restart your webserver&#039;&#039;&#039; (if possible) and re-visit the Moodle configuration page after making any changes to PHP so it can pick up the correct version of GD.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=44271 Profile pictures] for additional information.&lt;br /&gt;
&lt;br /&gt;
== Why doesn&#039;t my Moodle site display the time and date correctly? ==&lt;br /&gt;
&lt;br /&gt;
Each language requires a specific language code (called a &#039;&#039;&#039;locale&#039;&#039;&#039; code) to allow dates to be displayed correctly. The language packs contain default standard codes, but sometimes these don&#039;t work on Windows servers.&lt;br /&gt;
&lt;br /&gt;
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. &amp;quot;esp_esp&amp;quot; for spanish)&lt;br /&gt;
&lt;br /&gt;
These new locale codes can be entered on the Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]] page, where they override the ones in the currently chosen language pack.&lt;br /&gt;
&lt;br /&gt;
==How do I uninstall Moodle?==&lt;br /&gt;
&#039;&#039;&#039;Moodle package installation&#039;&#039;&#039;: If you have downloaded a Moodle package, simply uninstall using your system commands. On Windows PCs, you should access the Control Panel -&amp;gt; Add/Remove Programs. Select the package name and click Change or Remove Programs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Webhost/manual installation&#039;&#039;&#039;: If you have installed Moodle manually or have installed onto a webhost, follow these steps:&lt;br /&gt;
*Delete the moodle database using this mysql command (or delete using your mysql client, e.g. PHPMyAdmin):&lt;br /&gt;
&amp;lt;pre&amp;gt;sql&amp;gt;DROP DATABASE moodle;&amp;lt;/pre&amp;gt;&lt;br /&gt;
:In the above example replace &#039;moodle&#039; with the name of the moodle database you created when installing.&lt;br /&gt;
*Delete the moodledata directory. If you, or your users, have uploaded materials into this directory take a copy of these before deleting this directory.&lt;br /&gt;
*Delete the moodle directory itself. This will delete all of the moodle PHP script files.&lt;br /&gt;
&lt;br /&gt;
==How do I upgrade Moodle? Do I just overwrite the files?==&lt;br /&gt;
Do not overwrite files, it may cause strange errors. You should read the [[Upgrade]] documentation before proceeding.&lt;br /&gt;
&lt;br /&gt;
==Migrating Moodle to a new site or server==&lt;br /&gt;
Migrating Moodle means that you have to move the current installation to a new server, and so may have to change IP addresses or DNS entries. To do this you will need to change the $CFG-&amp;gt;wwwroot value in the config.php on the new server. You will also have to change any absolute links stored in the database backup file (before restoring the file on the new server) either using the admin/replace.php script, your text editor or another &amp;quot;search and replace&amp;quot; tool, e.g. sed. For more details see the [[Moodle_migration | Moodle Migration]] page.&lt;br /&gt;
&lt;br /&gt;
==Why does my new installation display correctly on the server, but when I view it from a different machine, styles and images are missing?==&lt;br /&gt;
In the installation instructions, one of the suggested settings for &#039;webroot&#039; is &#039;localhost&#039;. This is fine if all you want to do is some local testing of your new Moodle installation. If, however, you want to view your new installation from another machine on the same local area network, or view your site on the internet, you will have to change this setting:&lt;br /&gt;
*For local testing, &#039;localhost&#039; is fine for the webroot ($CFG-&amp;gt;wwwroot in config.php). &lt;br /&gt;
*If you want to test your site from other machines on the same local area network (LAN), then you will have to use the private ip address of the serving machine, (e.g. 192.168.1.2/moodle) or the network name of the serving computer (e.g. network_name_of_serving_machine/moodle) as the web root. Depending on your LAN setup, it may be better to use the network name of the computer rather than its (private) ip address, because the ip address can and will change from time to time. If you don&#039;t want to use the network name, then you will have to speak to your network administrator and have them assign a permanent ip address to the serving machine.&lt;br /&gt;
*Finally, if you want to test your new installation across the internet, you will have to use either a domain name or a permanent (public) ip address/moodle as your web root. To handle both types of access, see [https://docs.moodle.org/en/masquerading masquerading].&lt;br /&gt;
&lt;br /&gt;
==Maximum upload file size - how to change it?==&lt;br /&gt;
There are several places to change the maximum file upload size. The first place to check is the Administration block.   Security -&amp;gt; Site Policies -&amp;gt; and look for &amp;quot;Maximum Uploaded File Size&amp;quot;.  This is the &amp;quot;maxbyte&amp;quot; variable found in older versions of Moodle (under Admin &amp;gt; Variables). Teachers may also set the maximum file size by the [[Course_settings#Maximum_upload_size|course administration block]].&lt;br /&gt;
&lt;br /&gt;
The second place to check are the server files.  The php.ini file has a limit which will override any other setting. (Hint: remember to restart your server for changes to take effect).  For more help see:&lt;br /&gt;
*[[Administration_FAQ#How_do_the_limits_on_uploaded_files_work.3F]]&lt;br /&gt;
*[[Installing_Moodle#Recheck_PHP_settings]]&lt;br /&gt;
*[[Installing_Moodle#Using_a_.htaccess_file_for_webserver_and_PHP_settings]]&lt;br /&gt;
*[[Site_policies#Maximum_uploaded_file_size]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Errors FAQ]]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:FAQ Instalación]]&lt;br /&gt;
[[fr:FAQ d&#039;installation]]&lt;br /&gt;
[[nl:Installatie FAQ]]&lt;br /&gt;
[[ja:インストールFAQ]]&lt;br /&gt;
[[ru:Установка FAQ]]&lt;br /&gt;
[[pl:Instalacja FAQ]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Upgrading_to_Moodle_1.9&amp;diff=45014</id>
		<title>Upgrading to Moodle 1.9</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Upgrading_to_Moodle_1.9&amp;diff=45014"/>
		<updated>2008-10-09T13:31:17Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Upgrading more than one version */ correct grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.9}}&lt;br /&gt;
==Before upgrading, please...==&lt;br /&gt;
&lt;br /&gt;
* Check that your site meets all system requirements for 1.9 in &#039;&#039;Administration &amp;gt; Server &amp;gt; [[Environment]]&#039;&#039;&lt;br /&gt;
* Do a full database backup!&lt;br /&gt;
* Remember to purge PHP cache if using any PHP accelerator&lt;br /&gt;
* Read [[Upgrading to Moodle 1.8]] if you are upgrading to 1.9 from 1.6 or 1.7&lt;br /&gt;
* Read [[Upgrading to Moodle 1.7]] if you are upgrading from 1.6&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
* If upgrading from 1.6 or later, you must have converted your site to Unicode&lt;br /&gt;
* If upgrading from earlier than 1.6, we recommend upgrading to 1.6 first, then 1.8 -&amp;gt; 1.9&lt;br /&gt;
* We recommend PHP 5.2 or later, but you must have at least PHP 4.3.0&lt;br /&gt;
&lt;br /&gt;
==Now upgrade==&lt;br /&gt;
&lt;br /&gt;
Once you have satisfied the requirements for Moodle 1.9, follow the instructions on the [[Upgrading|upgrading]] page.&lt;br /&gt;
&lt;br /&gt;
==Upgrading more than one version==&lt;br /&gt;
&lt;br /&gt;
In general, it is recommended to upgrade via each version of Moodle, for example 1.7 -&amp;gt; 1.8 -&amp;gt; 1.9. An exception to this is when upgrading from 1.5 or 1.6, when it is recommended that 1.7 be skipped, in other words upgrade 1.5 -&amp;gt; 1.6 -&amp;gt; 1.8 -&amp;gt; 1.9. (The main reason for this recommendation is that the default roles settings obtained when upgrading to 1.7 are not ideal for 1.8 onwards.)&lt;br /&gt;
&lt;br /&gt;
==Front page activities==&lt;br /&gt;
&lt;br /&gt;
To enable logged-in users to participate in front page activities, such as viewing the site news, the default front page role should be set to student in &#039;&#039;Administration &amp;gt; Front Page &amp;gt; [[Front Page settings]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Gradebook ==&lt;br /&gt;
&lt;br /&gt;
=== What improvements in the gradebook justify upgrading from 1.8 to 1.9? ===&lt;br /&gt;
*Faster execution, more noticeable with large sites&lt;br /&gt;
*More scalable&lt;br /&gt;
*More control over the display of grades, to teachers and students&lt;br /&gt;
*More [[Category aggregation|aggregation options]]&lt;br /&gt;
*A simple, [[Development:Grades#API_for_communication_with_modules.2Fblocks|public API]] that can be used by any module to support grading&lt;br /&gt;
*Possibility to write [[Development:Gradebook_Report_Tutorial|custom grade reports]]&lt;br /&gt;
*A [[Development:Grades#History_tables|&amp;quot;Grade change history&amp;quot; record]]&lt;br /&gt;
&lt;br /&gt;
=== Why is the new gradebook so complicated? ===&lt;br /&gt;
Added power and control requires more options. It is mostly the number of options and settings that gives the impression of complexity. Here are some of the main reasons for the changes made in the gradebook for 1.9:&lt;br /&gt;
&lt;br /&gt;
*Previous gradebook did not scale well: it became very slow and unmanageable in large organisations with many students, activities and grades&lt;br /&gt;
*Grades were generated and stored by each module without much consistency&lt;br /&gt;
*Difficulty in producing new types of reports&lt;br /&gt;
*No [[Outcomes]]&lt;br /&gt;
&lt;br /&gt;
=== Is the gradebook in 1.9 faster than in 1.8? ===&lt;br /&gt;
According to [http://moodle.org/mod/forum/discuss.php?d=91034&amp;amp;parent=410224 one early report], yes. There are other more thorough benchmark tests being conducted, and we will publish the results when they are made public.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Release Notes]]&lt;br /&gt;
*[[:Category:Moodle 1.9]]&lt;br /&gt;
*[[Question Engine Changes in Moodle 1.9]] (includes some important documentation on question engine upgrade for those who make extensive use of the question bank and quiz module)&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=75088 Automatic update of language package while updating in 1.9]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=89825 Change in Moodle 1.8 and 1.9 : admin tree icons are now themeable - some themes need to be upgraded]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=92027 Migration 1.8 to 1.9]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Mise à jour à Moodle 1.9]]&lt;br /&gt;
[[ja:Moodle1.9へのアップグレード]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=44787</id>
		<title>Installation FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=44787"/>
		<updated>2008-10-05T02:29:27Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Installation hangs when setting-up database tables */  add link to MySQL manual&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==PHP - is it installed and what version do I have?==&lt;br /&gt;
&lt;br /&gt;
Make a new file on your web site called &#039;&#039;info.php&#039;&#039;, containing the following text, and call it from your browser:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?PHP phpinfo() ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If nothing happens then you don&#039;t have PHP installed or your webserver is not configured to handle .php files properly. See the installation docs for some information about where to download it for your computer. See the [[phpinfo]] page for details about the content of this page.&lt;br /&gt;
&lt;br /&gt;
== System information needed for Installation problems forum ==&lt;br /&gt;
When posting questions to the [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum], try to provide as much background information as possible about your moodle system. Use this template to copy and paste into your post:&lt;br /&gt;
* Server Operating System name (version also if possible): &lt;br /&gt;
* Browser name (version also if possible):&lt;br /&gt;
* Moodle version:&lt;br /&gt;
* Moodle install type? (New/Upgrade):&lt;br /&gt;
* Moodle config.php attached?(Y/N):&lt;br /&gt;
* Phpinfo attached? (Y/N):&lt;br /&gt;
&lt;br /&gt;
For the last two items, try to include the following in your post as an attachment:&lt;br /&gt;
* A copy of your phpinfo output as shown in your browser (see the instructions above for an explanation of how to obtain this).&lt;br /&gt;
* A copy of the Moodle configuration file. This is located in the directory moodle and is named config.php&lt;br /&gt;
&lt;br /&gt;
Copy and paste both of these into a single text file (using vi, Notepad, etc) and attach this to your post.&lt;br /&gt;
&lt;br /&gt;
If you cannot provide your phpinfo, try to copy &amp;amp; paste and complete these in your post:&lt;br /&gt;
* Webserver (e.g. Apache/IIS) version:&lt;br /&gt;
* Database server (e.g. MySQL, PostgreSQL) version:&lt;br /&gt;
* PHP version:&lt;br /&gt;
&lt;br /&gt;
For installation on web hosting accounts: contact your support desk who should be able to tell you this information.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Security Warning&#039;&#039;&#039;: Make sure you edit any files and delete any passwords before posting onto the forum.&lt;br /&gt;
&lt;br /&gt;
==What &amp;amp; where are Moodle&#039;s configuration settings stored?==&lt;br /&gt;
Configuration settings are stored in the config.php file stored in your moodle folder. This file is created during the installation process. If there is a problem and the installation cannot create the file, you can try creating it manually from the [[Configuration file]] docs. Please remember that manually editing the file is not recommended and may lead to blank pages, especially if there are additional spaces and/or lines after the final php closing tag &amp;quot;?&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Downloading previous releases of Moodle==&lt;br /&gt;
* &#039;&#039;&#039;Generic Packages&#039;&#039;&#039;: If your server does not meet the [[Installing_Moodle#Requirements | requirements]] for the current version of Moodle, you can download previous releases by using wget, lynx or curl with this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
:For example: to download Moodle version 1.5, use http://download.moodle.org/stable15. You&#039;ll see a directory tree with the files displayed. Click on the one you want and download as normal - if you require the latest update of the version, scroll to the end of the list and download the &amp;quot;moodle-latest&amp;quot; file, or alternatively use these URLs for zip or tgz downloads:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].tgz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Changes made in the version in the last month are listed in the &amp;quot;CHANGES&amp;quot; file in the directory listing. The files you download contain Moodle code and are not the Windows or Mac packages - so you need to have a webserver, a database server and PHP already installed. The earliest version available is Moodle 1.3.&lt;br /&gt;
* &#039;&#039;&#039;Windows Packages&#039;&#039;&#039;: To download previous releases of the Moodle packages for Windows, use this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/windows/MoodleWindowsInstaller-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Mac Packages&#039;&#039;&#039;: To download previous releases of the Mac pacakges, use either of these URLs (depending on whether you need the Intel or PPC package):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-Intel-[version_number].dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-PPC-[version_number}.dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Using CVS&#039;&#039;&#039;: You can also use CVS to download older releases and incremental releases of the Moodle generic packages, e.g. Moodle 1.5.4 - see the [[CVS_for_Administrators | CVS documentation]].&lt;br /&gt;
&lt;br /&gt;
== How to enable and check PHP error logs==&lt;br /&gt;
PHP can be set up to log errors in a variety of different ways: two of these involve the use of the php.ini file and the ini_set command. &lt;br /&gt;
* &#039;&#039;&#039;Using the php.ini file&#039;&#039;&#039;: The log settings are contained in the php.ini file stored on the server. If you don&#039;t know where that is, edit your Moodle &#039;&#039;config.php&#039;&#039; and add the following as the second line&lt;br /&gt;
&lt;br /&gt;
  phpinfo();&lt;br /&gt;
&lt;br /&gt;
:then reload the web page. Look for the entry &#039;&#039;&#039;Configuration File (php.ini) Path&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:When you have located php.ini open it in your favorite text editor. Find the &#039;&#039;&#039;Error handling and logging&#039;&#039;&#039; section of the php.ini file. Make sure that both &#039;&#039;&#039;display_errors = On&#039;&#039;&#039;, &#039;&#039;&#039;display_startup_errors = On&#039;&#039;&#039; and &#039;&#039;&#039;log_errors = On&#039;&#039;&#039; are present and uncommented. Check the value of &#039;&#039;&#039;error_log&#039;&#039;&#039; - 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).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Using ini_set commands&#039;&#039;&#039;: If you are using Moodle 1.7 or higher, the previous steps are not enough. In those versions error logging parameters are dependant on certain administrative settings that you specify in the debugging section. The problem is that if you can&#039;t access the administrative pages, you can&#039;t set the debugging options. So the only way to modify them is by adding the following lines to your config.php file, just before the last line (the one containing a single&#039;?&amp;gt;&#039; only):&lt;br /&gt;
&lt;br /&gt;
  ini_set (&#039;display_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;log_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;display_startup_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;error_reporting&#039;, E_ALL);&lt;br /&gt;
  $CFG-&amp;gt;debug = DEBUG_ALL;&lt;br /&gt;
&lt;br /&gt;
:This will enable the same settings specified above even if Moodle sets them otherwise. &lt;br /&gt;
:&#039;&#039;&#039;Important&#039;&#039;&#039;: Remember to put them just before the last line of config.php.&lt;br /&gt;
&lt;br /&gt;
==Email copies are not being sent from my forums==&lt;br /&gt;
&lt;br /&gt;
You &#039;&#039;must&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
Basically, you need to set up a process to regularly call the script &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://yoursite/admin/cron.php&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Please refer to the [[Cron|cron instructions]].&lt;br /&gt;
&lt;br /&gt;
Tips:&lt;br /&gt;
* Try the default settings in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039;. This generally works.&lt;br /&gt;
*Make sure that &#039;&#039;allowuseremailcharset&#039;&#039; in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039; is set to No. Setting this to Yes can cause a problem in some versions of Moodle.&lt;br /&gt;
&lt;br /&gt;
==I can&#039;t log in - I just stay stuck on the login screen==&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;src=bar_sch_nam Norton firewall products].&lt;br /&gt;
&lt;br /&gt;
The server admin can also fix this for everyone by changing the &#039;&#039;secureforms&#039;&#039; variable to &#039;No&#039; in the security section of Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]].&lt;br /&gt;
&lt;br /&gt;
Another possible cause of this problem is that sessions are not configured properly on the server. You can test this by calling the script &amp;lt;nowiki&amp;gt;http://yourserver/moodle/lib/session-test.php&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are still having problems, read the [[Can_not_log_in | Cannot log in]] page.&lt;br /&gt;
&lt;br /&gt;
==I log in but the login link doesn&#039;t change. I am logged in and can navigate freely.==&lt;br /&gt;
&lt;br /&gt;
Make sure the URL in your &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; setting is exactly the same as the one you are actually using to access the site.&lt;br /&gt;
&lt;br /&gt;
==Uploaded files give &amp;quot;File not found&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
For example: Not Found: The requested URL /moodle/file.php/2/myfile.jpg was not found on this server.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;httpd.conf&#039;&#039;, or to a &#039;&#039;.htaccess&#039;&#039; file in your local directory (see [[Installing Moodle]] for more details):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
Note, this will ONLY work for Apache versions 2.x.&lt;br /&gt;
&lt;br /&gt;
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&#039;t be able to use relative links within HTML resources.&lt;br /&gt;
&lt;br /&gt;
To use this alternative method, you should change the &#039;&#039;slasharguments&#039;&#039; variable. For moodle versions &amp;lt; 1.7, this is located in the Operating System section of &#039;&#039;Administration &amp;gt; Configuration &amp;gt; [[admin/config|Variables]]&#039;&#039;. In later versions, this option is located in &#039;&#039;Site Administration &amp;gt; Server &amp;gt; HTTP&#039;&#039;. You should now be able to access your uploaded files.&lt;br /&gt;
&lt;br /&gt;
==Why are all my pages blank?==&lt;br /&gt;
&lt;br /&gt;
Check the dirroot variable in &#039;&#039;config.php&#039;&#039;. You must use complete, absolute pathnames e.g.&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dirroot = &amp;quot;d:\inetpub\sites\www.yoursite.com\web\moodle&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
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 see [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | How to enable and check PHP error logs]].&lt;br /&gt;
&lt;br /&gt;
To determine if MySQL support is your problem, insert this as the second line in your &#039;&#039;config.php&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
 phpinfo();&lt;br /&gt;
&lt;br /&gt;
then reload the web page. Examine the output closely to see if MySQL is supported. If not look for a package you are missing.&lt;br /&gt;
&lt;br /&gt;
== Why is a particular page blank or incomplete? ==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your web server log files!!&#039;&#039;&#039; &lt;br /&gt;
:If a particular page is blank or incomplete (it doesn&#039;t display the footer), before you do anything else [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | check your error logs]]. Having established that PHP error 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.&lt;br /&gt;
&lt;br /&gt;
*If you are &#039;&#039;&#039;upgrading to a new version of Moodle&#039;&#039;&#039;, check that you do not have an old version of a non-standard block or module installed. Remove any such blocks or modules installed using the admin settings page and start the install process again. However, do also make sure that you have included all optional plugins that were required by your courses. &lt;br /&gt;
&lt;br /&gt;
*If you &#039;&#039;&#039;do not see any blocks listed&#039;&#039;&#039;, turn editing on and remove any blocks that you have added to that page and try reloading.&lt;br /&gt;
&lt;br /&gt;
*You may get this error immediately after &#039;&#039;&#039;selecting a language&#039;&#039;&#039;. At this stage of the installation process your Moodle computer may need to connect to the Internet and download a language pack, so check that the computer can access the Internet by using a browser. Check also that your PHP settings are as given in the Moodle [[Installing_Moodle#Requirements | Moodle Requirements]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=97734 PHP configuration error] forum discussion  &lt;br /&gt;
&lt;br /&gt;
==Installation hangs when setting-up database tables==&lt;br /&gt;
Sometimes the installation will hang when setting up tables. This will be an abrupt hang with half the page displayed in the browser and/or other outputs removed. Examples are:&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Truncated mysql statements&#039;&#039;&#039;:&lt;br /&gt;
 &lt;br /&gt;
 (mysql): SET NAMES &#039;utf8&#039;&lt;br /&gt;
 --------------------------------------------------------------------------------&lt;br /&gt;
 (mysql): SHOW LOCAL VARIABLES LIKE &#039;character_set_database&#039;&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 (no more statements are displayed)   &lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Missing Continue button&#039;&#039;&#039;: The “Scroll to continue” link is displayed but no “Continue” button is there. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: There is an exception to this when upgrading an existing database and the installation may appear to hang at the roles generation phase. This process can take a very long time - so please be patient.&lt;br /&gt;
&lt;br /&gt;
Below are some solutions you can try to overcome this problem:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check for mysql limits&#039;&#039;&#039;. This is often a mysql error and not a php error. Check that there is no limit placed on your mysql database, e.g. a &amp;quot;questions&amp;quot; limit. See [http://dev.mysql.com/doc/refman/5.0/en/user-resources.html the mysql manual].&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your .htaccess files&#039;&#039;&#039;. If the install is on a webhost, adding the following line to the .htaccess file in the moodle directory has been known to solve the problem.&lt;br /&gt;
 AddType x-mapp-php5 .php&lt;br /&gt;
&lt;br /&gt;
:Try also renaming the .htaccess file so that it is disabled.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Code customizations&#039;&#039;&#039;. You may also want to look and see if you&#039;ve customized any of your code.  Look at the last successful table, and then look at the block, mod, or other code that is referenced by that table.  For example, if your install hangs and continues to say that the forum tables were successful as the last message, look at /mod/forum/ for any custom code.  If you have customized code, backup those files and replace with the correct files.  You can then restart the install by renaming config.php or reinstalling your database from the backup.  If your install is successful, you can make your code changes back into the stock Moodle code.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your memory limit&#039;&#039;&#039;. It may also be that the &amp;quot;memory_limit&amp;quot; in your php.ini is set too low. Please check your php.ini file and allocate the recommended amount (see [https://docs.moodle.org/en/Installing_Moodle#Requirements Moodle requirements]). For Moodle version 1.8 and above at least 40MB is  recommended.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Upgrade incrementally&#039;&#039;&#039;. To avoid this problem when upgrading, it is recommended to upgrade via each version of Moodle, for example 1.7 -&amp;gt; 1.8 -&amp;gt; 1.9 (with the exception of upgrading from 1.5 or 1.6, when it is recommended that 1.7 is skipped, in other words upgrade 1.5 -&amp;gt; 1.6 -&amp;gt; 1.8 -&amp;gt; 1.9).&lt;br /&gt;
&lt;br /&gt;
A work-around to this problem is to setup a working Moodle system on your local PC or server using the [http://download.moodle.org Moodle Packages]. Once you have a running Moodle, [https://docs.moodle.org/en/Upgrading_Moodle#Backup_important_data backup the database] and import to your webhost. Then backup the Moodle code itself (the &amp;quot;moodle&amp;quot; directory on your PC) and copy this to your webhost using (for example) FTP. Finally, edit the moodle/config.php file for the new settings that have to be changed for the webhost.&lt;br /&gt;
&lt;br /&gt;
==Why can&#039;t I upload a new image into my profile?==&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see anything on your user profile pages to let you upload user images then it&#039;s usually because GD is not enabled on your server. GD is a library that allows image processing.&lt;br /&gt;
&lt;br /&gt;
1. Make sure &#039;&#039;&#039;GD has been included in your PHP installation&#039;&#039;&#039;. You can check this by going into Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[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.&lt;br /&gt;
&lt;br /&gt;
2. If Moodle thinks GD is not installed, then you will need to &#039;&#039;&#039;install the GD library&#039;&#039;&#039;. &lt;br /&gt;
*On Unix you may need to re-compile PHP with arguments something like this:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-gd &lt;br /&gt;
 --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-ttf --enable-gd-native-ttf &lt;br /&gt;
 --enable-magic-quotes --with-mysql --enable-sockets --enable-track-vars &lt;br /&gt;
 --enable-versioning --with-zlib&lt;br /&gt;
&lt;br /&gt;
* On Windows this is usually a matter of &amp;quot;turning on&amp;quot; the extension in PHP by editing your php.ini file. To do this remove the semicolon for the php_gd2.dll extension - check that this file is actually present in your php extensions  folder first (search your php.ini for extension_dir to determine where this points to on your hard disk). You should then have a line that looks like this:&lt;br /&gt;
 extension=php_gd2.dll&lt;br /&gt;
&lt;br /&gt;
:Windows users should see the [[Installing AMP|installation instructions]] for further help. &lt;br /&gt;
&lt;br /&gt;
3. Remember to &#039;&#039;&#039;restart your webserver&#039;&#039;&#039; (if possible) and re-visit the Moodle configuration page after making any changes to PHP so it can pick up the correct version of GD.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=44271 Profile pictures] for additional information.&lt;br /&gt;
&lt;br /&gt;
== Why doesn&#039;t my Moodle site display the time and date correctly? ==&lt;br /&gt;
&lt;br /&gt;
Each language requires a specific language code (called a &#039;&#039;&#039;locale&#039;&#039;&#039; code) to allow dates to be displayed correctly. The language packs contain default standard codes, but sometimes these don&#039;t work on Windows servers.&lt;br /&gt;
&lt;br /&gt;
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. &amp;quot;esp_esp&amp;quot; for spanish)&lt;br /&gt;
&lt;br /&gt;
These new locale codes can be entered on the Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]] page, where they override the ones in the currently chosen language pack.&lt;br /&gt;
&lt;br /&gt;
==How do I uninstall Moodle?==&lt;br /&gt;
&#039;&#039;&#039;Moodle package installation&#039;&#039;&#039;: If you have downloaded a Moodle package, simply uninstall using your system commands. On Windows PCs, you should access the Control Panel -&amp;gt; Add/Remove Programs. Select the package name and click Change or Remove Programs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Webhost/manual installation&#039;&#039;&#039;: If you have installed Moodle manually or have installed onto a webhost, follow these steps:&lt;br /&gt;
*Delete the moodle database using this mysql command (or delete using your mysql client, e.g. PHPMyAdmin):&lt;br /&gt;
&amp;lt;pre&amp;gt;sql&amp;gt;DROP DATABASE moodle;&amp;lt;/pre&amp;gt;&lt;br /&gt;
:In the above example replace &#039;moodle&#039; with the name of the moodle database you created when installing.&lt;br /&gt;
*Delete the moodledata directory. If you, or your users, have uploaded materials into this directory take a copy of these before deleting this directory.&lt;br /&gt;
*Delete the moodle directory itself. This will delete all of the moodle PHP script files.&lt;br /&gt;
&lt;br /&gt;
==How do I upgrade Moodle? Do I just overwrite the files?==&lt;br /&gt;
Do not overwrite files, it may cause strange errors. You should read the [[Upgrade]] documentation before proceeding.&lt;br /&gt;
&lt;br /&gt;
==Migrating Moodle to a new site or server==&lt;br /&gt;
Migrating Moodle means that you have to move the current installation to a new server, and so may have to change IP addresses or DNS entries. To do this you will need to change the $CFG-&amp;gt;wwwroot value in the config.php on the new server. You will also have to change any absolute links stored in the database backup file (before restoring the file on the new server) either using the admin/replace.php script, your text editor or another &amp;quot;search and replace&amp;quot; tool, e.g. sed. For more details see the [[Moodle_migration | Moodle Migration]] page.&lt;br /&gt;
&lt;br /&gt;
==Why does my new installation display correctly on the server, but when I view it from a different machine, styles and images are missing?==&lt;br /&gt;
In the installation instructions, one of the suggested settings for &#039;webroot&#039; is &#039;localhost&#039;. This is fine if all you want to do is some local testing of your new Moodle installation. If, however, you want to view your new installation from another machine on the same local area network, or view your site on the internet, you will have to change this setting:&lt;br /&gt;
*For local testing, &#039;localhost&#039; is fine for the webroot ($CFG-&amp;gt;wwwroot in config.php). &lt;br /&gt;
*If you want to test your site from other machines on the same local area network (LAN), then you will have to use the private ip address of the serving machine, (e.g. 192.168.1.2/moodle) or the network name of the serving computer (e.g. network_name_of_serving_machine/moodle) as the web root. Depending on your LAN setup, it may be better to use the network name of the computer rather than its (private) ip address, because the ip address can and will change from time to time. If you don&#039;t want to use the network name, then you will have to speak to your network administrator and have them assign a permanent ip address to the serving machine.&lt;br /&gt;
*Finally, if you want to test your new installation across the internet, you will have to use either a domain name or a permanent (public) ip address/moodle as your web root. To handle both types of access, see [https://docs.moodle.org/en/masquerading masquerading].&lt;br /&gt;
&lt;br /&gt;
==Maximum upload file size - how to change it?==&lt;br /&gt;
There are several places to change the maximum file upload size. The first place to check is the Administration block.   Security -&amp;gt; Site Policies -&amp;gt; and look for &amp;quot;Maximum Uploaded File Size&amp;quot;.  This is the &amp;quot;maxbyte&amp;quot; variable found in older versions of Moodle (under Admin &amp;gt; Variables). Teachers may also set the maximum file size by the [[Course_settings#Maximum_upload_size|course administration block]].&lt;br /&gt;
&lt;br /&gt;
The second place to check are the server files.  The php.ini file has a limit which will override any other setting. (Hint: remember to restart your server for changes to take effect).  For more help see:&lt;br /&gt;
*[[Administration_FAQ#How_do_the_limits_on_uploaded_files_work.3F]]&lt;br /&gt;
*[[Installing_Moodle#Recheck_PHP_settings]]&lt;br /&gt;
*[[Installing_Moodle#Using_a_.htaccess_file_for_webserver_and_PHP_settings]]&lt;br /&gt;
*[[Site_policies#Maximum_uploaded_file_size]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Errors FAQ]]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:FAQ Instalación]]&lt;br /&gt;
[[fr:FAQ d&#039;installation]]&lt;br /&gt;
[[nl:Installatie FAQ]]&lt;br /&gt;
[[ja:インストールFAQ]]&lt;br /&gt;
[[ru:Установка FAQ]]&lt;br /&gt;
[[pl:Instalacja FAQ]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Administrator_documentation&amp;diff=44770</id>
		<title>Administrator documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Administrator_documentation&amp;diff=44770"/>
		<updated>2008-10-03T18:02:58Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* FAQs */  added link to new FAQ page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The purpose of this page is to list useful links by general topics for administrators.&lt;br /&gt;
&lt;br /&gt;
== Installation &amp;amp; Upgrading ==&lt;br /&gt;
&lt;br /&gt;
*[[Installation Quickstart]] for an overview of the installation steps&lt;br /&gt;
*[[Installing Moodle]] for detailed installation instructions&lt;br /&gt;
*[[Installation FAQ]]&lt;br /&gt;
*[[Installing AMP|Options for installing Apache, MySQL and PHP]]&lt;br /&gt;
*[[Upgrading|Upgrading Moodle]]&lt;br /&gt;
&lt;br /&gt;
== System-specific Instructions &amp;amp; Packages ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Unix/Linux-based&#039;&#039;&#039;&lt;br /&gt;
* [[SUSE Linux Server 10|Automated Installation Guide for SUSE Linux Enterprise Server 10]] operating system&lt;br /&gt;
* [[RedHat Linux installation|Step by Step Installation Guide for RedHat]] operating system&lt;br /&gt;
* [[Debian GNU/Linux installation|Step by Step Installation Guide for Debian GNU/Linux]] operating system&lt;br /&gt;
* [[Step-by-step Install Guide for Ubuntu]]&lt;br /&gt;
* [[Step-by-step Install Guide for Ubuntu using apt-get]]&lt;br /&gt;
* [[Step-by-step Install Guide for Zenwalk-5.0]]&lt;br /&gt;
* [[OLPC XS installation|Step by Step Installation Guide for the One Laptop per Child XS Server (Beta)]]&lt;br /&gt;
* [[Step-by-step Install Guide for Solaris 10 with Oracle 10]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Windows&#039;&#039;&#039;&lt;br /&gt;
* [[Windows installation|Windows installations with instructions for Windows NT/2000/2003 servers]]&lt;br /&gt;
* [[Windows installation using XAMPP|Windows installation using XAMPP: Apache, MySQL and PHP]]&lt;br /&gt;
* [[Development:Windows_Installer_anywhere|MoodleAnywhere]] another Windows installation package&lt;br /&gt;
* [[Installing Moodle on Windows Vista]] - how to&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mac&#039;&#039;&#039;&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete Install Packages for Mac OS X 10.3/10.4/10.5]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by Step Installation on a Mac OS X 10.4 Client using the internal web server]]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X 10.5 Server]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Web Hosts&#039;&#039;&#039;&lt;br /&gt;
* [[1and1_MySQL_installation | Installation on 1and1 web hosting]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Others&#039;&#039;&#039;&lt;br /&gt;
* [[Installing Oracle for PHP]]&lt;br /&gt;
&lt;br /&gt;
==Security, Performance and Roles==&lt;br /&gt;
&lt;br /&gt;
*[[Security]] contains important security procedures for a production site&lt;br /&gt;
*[[Performance | Performance and optimization]] for ideas on improving the speed of your installation&lt;br /&gt;
*[[Manage roles | Managing roles]] For Moodle 1.7 and later.&lt;br /&gt;
*[[suhosin]] is an advanced protection system for PHP installation. It was designed to protect servers and users from known and unknown flaws in PHP applications and the PHP core.&lt;br /&gt;
&lt;br /&gt;
== FAQs ==&lt;br /&gt;
&lt;br /&gt;
*[[Installation FAQ]]&lt;br /&gt;
*[[Administration FAQ]]&lt;br /&gt;
*[[Backup FAQ]]&lt;br /&gt;
*[[Errors FAQ]]&lt;br /&gt;
&lt;br /&gt;
== Configuration Settings ==&lt;br /&gt;
*[[Site administration block]] contains configuration setting links&lt;br /&gt;
*[[Notification page]] used to update versions&lt;br /&gt;
*[[Variables]]&lt;br /&gt;
*[[Site settings]]&lt;br /&gt;
*[[Themes]]&lt;br /&gt;
*[[Language]]&lt;br /&gt;
*[[Activity modules administration]]&lt;br /&gt;
*[[Blocks administration]]&lt;br /&gt;
*[[Filters]]&lt;br /&gt;
*[[Backup settings]]&lt;br /&gt;
*[[HTML editor settings]]&lt;br /&gt;
*[[Calendar settings]]&lt;br /&gt;
*[[Maintenance mode]]&lt;br /&gt;
&lt;br /&gt;
* See also: &lt;br /&gt;
**[[Location of admin settings in 1.7|Comparison between configuration settings in Moodle 1.6 &amp;amp; 1.7]]&lt;br /&gt;
&lt;br /&gt;
==User Management==&lt;br /&gt;
&lt;br /&gt;
*[[Authentication]]&lt;br /&gt;
*[[Add new user|Add a new user]] - on a site&lt;br /&gt;
*[[Upload users]] - from a file to a site, and into existing course and group, some existing user global updates&lt;br /&gt;
*[[Enrolment plugins]]&lt;br /&gt;
**[[Flat file]] - enrol existing users in a course&lt;br /&gt;
*[[Roles and capabilities|Assigning user a role]] - typical assignments include:&lt;br /&gt;
**[[Students|Enrol students in a course]]&lt;br /&gt;
**[[Courses (administrator)|Assign teachers]] - to a course&lt;br /&gt;
**[[Assign creators|Assign course creators]] - in a site&lt;br /&gt;
**[[Assign administrators]] - in a site&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
&lt;br /&gt;
*[[Courses (administrator)|Courses]] and [[Course formats|course formats]]&lt;br /&gt;
*[[Reports (administrator)]] and [[Logs]]&lt;br /&gt;
*[[Site files]]&lt;br /&gt;
*[[Moodle database|Database]]&lt;br /&gt;
*[[Environment]]&lt;br /&gt;
*[[Moodle Network]] and Moodle [[Community hub]]&lt;br /&gt;
*[[Streaming Media]]&lt;br /&gt;
*[[Case studies (administrator)]]&lt;br /&gt;
*[[Anti-virus]]&lt;br /&gt;
*[[System Monitoring and Server Statistic Software]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[:Category:Administrator | Index of all Administrator-related pages]]&lt;br /&gt;
*[[Integrations]]&lt;br /&gt;
*[[CVS for Administrators]]&lt;br /&gt;
*[[Email processing]]&lt;br /&gt;
*[[Search engine optimization]]&lt;br /&gt;
*[[Messaging]]&lt;br /&gt;
*[[Migration]]&lt;br /&gt;
*[[Metacourses]]&lt;br /&gt;
*[[Block layout]]&lt;br /&gt;
*[[Customizing Moodle]]&lt;br /&gt;
*[[Administrator do&#039;s and don&#039;ts]]&lt;br /&gt;
*[[Using Moodle book]] Chapter 16: Moodle Administration&lt;br /&gt;
*[[Administration hacks]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Administrator]]&lt;br /&gt;
[[cs:Rukověť správce]]&lt;br /&gt;
[[es:Documentación para Administradores]]&lt;br /&gt;
[[eu:Kudeatzaileentzako dokumentazioa]]&lt;br /&gt;
[[fr:Documentation administrateur]]&lt;br /&gt;
[[ja:管理者ドキュメント]]&lt;br /&gt;
[[ko:관리자 문서]]&lt;br /&gt;
[[nl:Documentatie voor beheerders]]&lt;br /&gt;
[[pt:Documentação para administradores]]&lt;br /&gt;
[[ru:Администраторам]]&lt;br /&gt;
[[sk:Dokumentácia pre správcov]]&lt;br /&gt;
[[zh:管理员文档]]&lt;br /&gt;
[[pl:Administrator documentation]]&lt;br /&gt;
[[fi:Ylläpitäjän opas]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=44488</id>
		<title>Installing Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=44488"/>
		<updated>2008-09-29T10:34:19Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Using a hosted server */  fix broken link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Firstly, don&#039;t panic! :-)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This guide explains how to install Moodle for the first time. For some of these steps it goes into a lot of detail to try and cover the majority of possible web server setups, so this page may look long and complicated. Don&#039;t panic, once you know how to do it you can install Moodle in minutes!&lt;br /&gt;
&lt;br /&gt;
If you have problems please read this page carefully - most common issues are answered in here. If you still have trouble, you can seek help from the Moodle community via  [http://moodle.org/course/view.php?id=5 moodle.org Using Moodle].&lt;br /&gt;
&lt;br /&gt;
Another option is to contact a [http://moodle.com/hosting/ Moodle Partner providing Moodle hosting] who can completely maintain Moodle for you, so that you can ignore all this and get straight into educating! A Moodle partner is the preferred option but if you decide to choose a hosting company that has cpanel then [http://ic.eflclasses.org/tutorials/settingupmoodleonhostingwitholdcpanel.swf this tutorial will guide you]  through the process of choosing a host and setting up moodle via the old cpanel. If you have the new cpanel please use this link [http://ic.eflclasses.org/tutorials/settingupmoodleoncpanel.swf this tutorial will guide you].  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; some hosting companies offer one-click moodle install options such as fantastico, which whilst sometimes effective, usually use old (sometimes years old) versions of moodle and sometimes simply don&#039;t work. If one of these goes wrong, your best bet is often to start from scratch following the instructions here yourself. Its almost certainly quicker.&lt;br /&gt;
&lt;br /&gt;
If you want to run Moodle on your own computer and this page looks a bit daunting, then please see our guides on how to install one of Moodle&#039;s complete [[Complete install packages for Windows|Windows packages]], [[Complete Install Packages for Mac OS X|Mac OS packages]] or [[Installing AMP |Installing Apache, MySQL and PHP(AMP)]]. They provide alternative instructions to install all this on most popular platforms.&lt;br /&gt;
&lt;br /&gt;
==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
Moodle is primarily developed in Linux using [[Apache]], [[MySQL]] and [[PHP]] (also sometimes known as the LAMP platform), but is also regularly tested with Windows XP/2000/2003 (WAMP), Solaris 10 (Sparc and x64), Mac OS X and Netware 6 operating systems. Support for PostgreSQL, Oracle and Microsoft SQL Server is also available.&lt;br /&gt;
&lt;br /&gt;
The procedure for installing Moodle on the Windows platform (e.g. Windows Server, IIS and MSSQL) varies slightly to the procedure for the LAMP platform. See [[Installation for Windows 2003 with IIS]] for more details.&lt;br /&gt;
&lt;br /&gt;
[[Installing Moodle on Windows Vista]] might help with &#039;&#039;&#039;Blank page problem while installing Moodle on Windows Vista&#039;&#039;&#039; .&lt;br /&gt;
&lt;br /&gt;
The requirements for Moodle are as follows:&lt;br /&gt;
&lt;br /&gt;
===Hardware === &lt;br /&gt;
* Disk space: 160MB free (min). You will require more free space to store your teaching materials.&lt;br /&gt;
* Memory: 256MB (min), 1GB (recommended). The general rule of thumb is that Moodle can support 50 &#039;&#039;concurrent&#039;&#039; users for every 1GB of RAM, but this will vary depending on your specific hardware and software combination. &lt;br /&gt;
** &#039;&#039;&#039;Note if you are using a hosted account:&#039;&#039;&#039; Most hosted accounts on commercial sites will meet Disk and Memory requirements. However, you should contact your web host&#039;s support desk to check that this is the case before signing-up with them. It is especially important to &#039;&#039;&#039;ask about any PHP memory limits or MySQL question limits&#039;&#039;&#039;. If your prospective host does not provide a service which meets these requirements, or you are already signed up with them, ask them why and consider taking your business elsewhere if they do not change.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
* Web server software. Most people use [[Apache]], but Moodle should work fine under any web server that supports [[PHP]], such as [[IIS]] on Windows platforms. PHP does impose requirements on versions of web servers, however these are complex and the general advice is to use the newest version possible of your chosen web server. &lt;br /&gt;
* PHP scripting language. (Please note that there have been issues installing Moodle with [http://www.php-accelerator.co.uk PHP-Accelerator]). There are currently two versions (or branches) of PHP available: PHP4 and PHP5 and the version requirements are listed below.&lt;br /&gt;
** For Moodle version 1.4 or later: PHP4 (version 4.1.0 or later) or PHP5 (version 5.1.0 or later) are supported.&lt;br /&gt;
** For Moodle version 1.6 or later: the PHP4 (version 4.3.0 or later) or PHP5 (version 5.1.0 or later) are supported. &lt;br /&gt;
** Future Moodle versions 2.0 or later will not support PHP4 and will require PHP5 (version 5.2.4 or later).&lt;br /&gt;
** PHP Settings. Check these settings in your php.ini or .htaccess file (if you&#039;re using Apache). For settings which use ON/OFF as their values, you can substitute 1 for ON and 0 for OFF if you prefer. &lt;br /&gt;
*** &#039;&#039;safe_mode&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;memory_limit&#039;&#039; should be at least 16M (32M is recommended for Moodle 1.7 and 40M for Moodle 1.8 or later). Large sites may need more than 128M. PHP 5.2.x requires higher memory_limit values than previous versions of PHP. 64bit operating systems require even more memory.&lt;br /&gt;
*** &#039;&#039;session.save_handler&#039;&#039; needs to be set to FILES.&lt;br /&gt;
*** &#039;&#039;magic_quotes_gpc&#039;&#039; should be ON. (It will be recommended to turn it off in 2.0.)&lt;br /&gt;
*** &#039;&#039;magic_quotes_runtime&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;file_uploads&#039;&#039; needs to be ON.&lt;br /&gt;
*** &#039;&#039;session.auto_start&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;session.bug_compat_warn&#039;&#039; needs to be OFF.&lt;br /&gt;
** PHP Extensions and libraries&lt;br /&gt;
*** The mbstring extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** The iconv extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** [http://www.libgd.org/ GD library] and the [http://www.freetype.org/ FreeType 2] library and extensions are needed to be able to look at the dynamic graphs that the logs pages make.&lt;br /&gt;
*** The mysql extension is required if you are using the MySQL database. Note that in some Linux distributions (notably Red Hat) this is an optional installation.&lt;br /&gt;
*** The pgsql extension is required if you are using the PostgreSQL database.&lt;br /&gt;
*** The pdo and pdo_sqlite extensions are required for the (experimental) SQLite 3 database support.&lt;br /&gt;
*** The curl extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The tokenizer extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The curl and openssl extensions are required for the Moodle network functionality (Moodle 1.8 or later).&lt;br /&gt;
*** Other PHP extensions may be required to support optional Moodle functionality, especially external authentication and/or enrolment (e.g. LDAP extension for LDAP authentication and the sockets extension for Chat server).&lt;br /&gt;
* A working database server: [[MySQL]] or [[PostgreSQL]] are completely supported and recommended for use with any version of Moodle. Support for Microsoft SQL Server and Oracle has been added in Moodle 1.7. MySQL is &#039;&#039;the&#039;&#039; choice for many people because it is very popular, but there are some [[Arguments in favour of PostgreSQL|arguments in favour of PostgreSQL]], especially if you are planning a large deployment.&lt;br /&gt;
** For Moodle 1.5, MySQL (version 3.23 or later) or PostgreSQL (7.4 or later). &lt;br /&gt;
** For Moodle 1.6, MySQL (version 4.1.12 or later) or PostgreSQL (7.4 or later).&lt;br /&gt;
** For Moodle 1.7, MySQL (version 4.1.12 or later), PostgreSQL (7.4 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
** For Moodle 1.8 or later, MySQL (version 4.1.12 or later), PostgreSQL (8.0 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
: MySQL Notes: For Moodle 1.6 or later, If you use latin languages only you can use MySQL 4.1.12. If you are using non-latin languages you require MySQL 4.1.16 or later. Currently the MySQL setting &amp;quot;strict mode&amp;quot; must be OFF (set to &amp;quot;&amp;quot; or &amp;quot;MYSQL40&amp;quot;) in the MySQL configuration file. &lt;br /&gt;
: PostgreSQL Notes: PostgreSQL 7.4 is recommended for earlier Moodle versions, since Moodle 1.8 only PostgreSQL 8.0 and above are supported.&lt;br /&gt;
* For showcases or low to medium-sized installations, Moodle 2.0 also includes (experimental) support for SQLite 3 database. This setup requires no database server, as the database file is stored in a local directory on the server.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== How many users? ==&lt;br /&gt;
&lt;br /&gt;
In addition to the hardware and software requirements, you will also need to think about the capacity of your Moodle installation in terms of the number of users it can handle. There are two numbers to plan for:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Browsing users&#039;&#039;&#039;: the maximum number of users able to browse your Moodle site. This is the number of computers in your organization or on your course (whichever is greater).&lt;br /&gt;
:&#039;&#039;&#039;Concurrent database users&#039;&#039;&#039;: the maximum number of concurrent database users (needed for Moodle activities such as quizzes). This is the number of users who will be using Moodle at the same time. In an educational institution, use your timetable/roster to obtain this figure.&lt;br /&gt;
&lt;br /&gt;
Once you know these figures for your users, you can start work out if your Moodle installation can support this capacity. The exact number of users depends on your hardware/software/network combination. Usually the amount of memory installed (RAM) is the deciding factor but a faster overall processor speed will also help in reducing waiting times for pages to load. &lt;br /&gt;
&lt;br /&gt;
The general rule of thumb for a single server is that the approx max concurrent users = RAM (GB) * 50 and the approx max browsing users = Approx max concurrent users * 5. As an example, a university with 500 total computers on campus and 100 concurrent users at any time will need approx 2GB of RAM on the one server to support the number of concurrent users.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note if you are using a hosted account&#039;&#039;&#039;: Ask your provider what limits are placed on the number of concurrent database connections and the processor load. This will give a good estimate of the number of users your Moodle install can manage.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note:&#039;&#039;&#039; As of August 31, 2007, Moodle 1.8.2+ is not recommended for large installations, especially if you have large number (e.g. 20,000+) of courses. The main reason is the codes related to ROLES are still not fully optimized with database queries and still need some work. If you are planning to use 1.8.x codes for a larger institution, please make sure that you have sufficient time to do your own testing and performance profiling.  Upgrade to Moodle 1.9!!&lt;br /&gt;
&lt;br /&gt;
[Update|Updating from a previous version] of Moodle has been improved quite a bit from 1.8.3+ version (see this thread discussion: http://moodle.org/mod/forum/discuss.php?d=83281).  Moodle 1.9 has even more improvements in all areas and is the recommended version.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Download and copy files into place ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to get Moodle, either as a compressed package or via [[CVS]]. &lt;br /&gt;
&lt;br /&gt;
=== Download from compressed packages===&lt;br /&gt;
There are two types of compressed packages at the [http://download.moodle.org/ download.moodle.org page:] which offer a variety of version, operating systems and compression types.&lt;br /&gt;
#The &amp;quot;Standard Distribution&amp;quot; (with Moodle only files) and &lt;br /&gt;
#Several operating system &amp;quot;Complete Install Packages&amp;quot; (which contains programs to create a Moodle in a web environment). Please see [[Complete install packages]] for more information.  &lt;br /&gt;
&lt;br /&gt;
Most of these instructions are for the standard distribution, &lt;br /&gt;
Download a compressed package and then unpack the archive into your file structure using either of these two commands:&lt;br /&gt;
 tar -zxvf [filename]&lt;br /&gt;
 unzip [filename]&lt;br /&gt;
&lt;br /&gt;
===Download from CVS===&lt;br /&gt;
To use CVS, helpful instructions are available at the [[CVS_for_Administrators | CVS for Administrators]] page. The full [http://cvs.moodle.org/moodle/ Moodle CVS repository] is also available for browsing. &lt;br /&gt;
&lt;br /&gt;
If you are using CVS, run the CVS Checkout command.&lt;br /&gt;
&lt;br /&gt;
===Directory created placement===&lt;br /&gt;
After either of the above processes, you will now have with a directory called &amp;quot;moodle&amp;quot;, containing a number of files and folders.&lt;br /&gt;
&lt;br /&gt;
For the standard package, you can either place the whole folder in your web server documents directory, in which case the site will be located at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com/moodle&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;, or you can copy all the contents straight into the main web server documents directory, in which case the site will be simply &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip&#039;&#039;&#039;: If you are downloading Moodle to your local computer and then uploading it to your web site, it is usually better to upload the whole archive as one file, and then do the unpacking on the server. Even web hosting interfaces like cPanel allow you to uncompress archives in the &amp;quot;File Manager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Structure of moodle directory ===&lt;br /&gt;
&lt;br /&gt;
You can safely skip this section, but here is a quick summary of the contents of the Moodle folder, to help get you oriented:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;config.php&#039;&#039; - contains basic settings. This file does not come with Moodle - you will create it by executing install.php or manually.&lt;br /&gt;
:&#039;&#039;install.php&#039;&#039; - the script you will run to create config.php&lt;br /&gt;
:&#039;&#039;version.php&#039;&#039; - defines the current version of Moodle code&lt;br /&gt;
:&#039;&#039;index.php&#039;&#039; - the front page of the site&lt;br /&gt;
:&#039;&#039;admin/&#039;&#039; - code to administrate the whole server&lt;br /&gt;
:&#039;&#039;auth/&#039;&#039; - plugin modules to authenticate users&lt;br /&gt;
:&#039;&#039;blocks/&#039;&#039; - plugin modules for the little side blocks on many pages&lt;br /&gt;
:&#039;&#039;calendar/&#039;&#039; - all the code for managing and displaying calendars&lt;br /&gt;
:&#039;&#039;course/&#039;&#039; - code to display and manage courses&lt;br /&gt;
:&#039;&#039;doc/&#039;&#039; - help documentation for Moodle (eg this page)&lt;br /&gt;
:&#039;&#039;files/&#039;&#039; - code to display and manage uploaded files&lt;br /&gt;
:&#039;&#039;lang/&#039;&#039; - texts in different languages, one directory per language&lt;br /&gt;
:&#039;&#039;lib/&#039;&#039; - libraries of core Moodle code&lt;br /&gt;
:&#039;&#039;login/&#039;&#039; - code to handle login and account creation&lt;br /&gt;
:&#039;&#039;mod/&#039;&#039; - all the main Moodle course modules are in here&lt;br /&gt;
:&#039;&#039;pix/&#039;&#039; - generic site graphics&lt;br /&gt;
:&#039;&#039;theme/&#039;&#039; - theme packs/skins to change the look of the site.&lt;br /&gt;
:&#039;&#039;user/&#039;&#039; - code to display and manage users&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Setting-up your system==&lt;br /&gt;
To ensure that Moodle will install successfully, you need to check that the web server settings are correct, then create a blank database for Moodle to use and finally create a directory on your hard disk for Moodle to save your materials and other files you upload into your courses.&lt;br /&gt;
&lt;br /&gt;
=== Check web server settings ===&lt;br /&gt;
&lt;br /&gt;
*Firstly, make sure that your web server is set up to use index.php as a default page (perhaps in addition to index.html, default.htm and so on). In Apache, this is done using a DirectoryIndex parameter in your httpd.conf file. Mine usually looks like this:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;DirectoryIndex&#039;&#039;&#039; index.php index.html index.htm&lt;br /&gt;
&lt;br /&gt;
:Just make sure index.php is in the list (and preferably towards the start of the list, for efficiency).&lt;br /&gt;
&lt;br /&gt;
*Secondly, &#039;&#039;&#039;if you are using Apache 2&#039;&#039;&#039;, then you should turn on the &#039;&#039;AcceptPathInfo&#039;&#039; variable, which allows scripts to be passed arguments like &amp;lt;nowiki&amp;gt;http://server/file.php/arg1/arg2&amp;lt;/nowiki&amp;gt;. This is essential to allow relative links between your resources, and also provides a performance boost for people using your Moodle web site. You can turn this on by adding these lines to your httpd.conf file. (NB: This setting, or any equivalent, is not required in Apache 1)&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
=== Recheck PHP settings ===&lt;br /&gt;
Moodle requires a number of PHP settings to be active for it to work. These were given in the Requirements section and &#039;&#039;&#039;On most servers these will already be the default settings&#039;&#039;&#039;.  However, some PHP servers (and some of the more recent PHP versions) may have things set differently, so it is useful to double-check that the settings are correct. These are defined in PHP&#039;s configuration file (usually called &#039;&#039;&#039;php.ini&#039;&#039;&#039;) or in the Apache &#039;&#039;&#039;.htaccess&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
 safe_mode = 0 (necessary)&lt;br /&gt;
 memory_limit = 40M (varies: minimum 16M, 32M Moodle v1.7, 40M Moodle v1.8, 128M large sites)&lt;br /&gt;
 session.save_handler = files (unless you are using another handler, e.g. mm)   &lt;br /&gt;
 magic_quotes_gpc = 1    (preferred but not necessary, 0 will be recommended in 2.0)&lt;br /&gt;
 magic_quotes_runtime = 0    (necessary)&lt;br /&gt;
 file_uploads = 1&lt;br /&gt;
 session.auto_start = 0&lt;br /&gt;
 session.bug_compat_warn = 0&lt;br /&gt;
&lt;br /&gt;
You may also want to set other, optional php.ini file settings while you are already editing it. For instance, you may want to reset the maximum upload size of file attachments, which usually defaults to 2M(egabytes). For instance, to set these to 16 Megabytes:&lt;br /&gt;
 &lt;br /&gt;
 post_max_size = 16M&lt;br /&gt;
 upload_max_filesize = 16M&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Using a .htaccess file for webserver and PHP settings ===&lt;br /&gt;
&lt;br /&gt;
Use the above if you can directly edit your server&#039;s files, but if you are setting-up Moodle on a webhost, or don&#039;t have access to &#039;&#039;&#039;httpd.conf&#039;&#039;&#039; or &#039;&#039;&#039;php.ini&#039;&#039;&#039; on your server, or you have Moodle on a server with other applications that require different settings, then don&#039;t worry, you can often still override the default settings. This only works on Apache servers and only when Overrides have been allowed in the main Apache configuration. Moodle is supplied with a htaccess file which you can use, or you can create your own file manually.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Use the default htaccess file&#039;&#039;&#039;. The easiest thing to do is just copy the sample file from moodle/lib/htaccess and edit it to suit your needs. It contains further instructions. For example, in a Unix shell:&lt;br /&gt;
&lt;br /&gt;
 cd moodle&lt;br /&gt;
 cp moodle/lib/htaccess .htaccess&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Create your own file&#039;&#039;&#039;. Alternatively you can create your own file called &#039;&#039;&#039;.htaccess&#039;&#039;&#039; in Moodle&#039;s main directory that contains lines like the following. &lt;br /&gt;
&lt;br /&gt;
 DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 php_value memory_limit 40M (adjust to your version of Moodle)&lt;br /&gt;
 php_flag magic_quotes_gpc 1&lt;br /&gt;
 php_flag magic_quotes_runtime 0&lt;br /&gt;
 php_flag file_uploads 1&lt;br /&gt;
 php_flag session.auto_start 0&lt;br /&gt;
 php_flag session.bug_compat_warn 0&lt;br /&gt;
&lt;br /&gt;
:If you have Apache version 2 installed, add these lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;IfDefine APACHE2&amp;gt;&lt;br /&gt;
     AcceptPathInfo on&lt;br /&gt;
 &amp;lt;/IfDefine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Otherwise add this single line:&lt;br /&gt;
&lt;br /&gt;
 AcceptPathInfo on&lt;br /&gt;
&lt;br /&gt;
:Optionally, you can also do things like define the maximum size for uploaded files, etc by adding these lines:&lt;br /&gt;
&lt;br /&gt;
 LimitRequestBody 0&lt;br /&gt;
 php_value upload_max_filesize 2M&lt;br /&gt;
 php_value post_max_size 2M&lt;br /&gt;
&lt;br /&gt;
:The value given in these lines is 2M. You may want to change this at a later date to allow uploading of larger files.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Some shared hosts do not allow .htaccess files&#039;&#039;&#039;. In this case, it may be necessary to place a php.ini file within each sub-directory of the site. To do this, you use your editor to create a php.ini file in the main moodle directory and later copy it to all sub-directories. The syntax for the php.ini file is different than the one used in .htaccess - you do not use the php_value and php_flag prefixes. See the example below:&lt;br /&gt;
 upload_max_filesize = 2M&lt;br /&gt;
 post_max_size = 2M&lt;br /&gt;
:After creating the php.ini file with all of the statements you need, run the script http://tips-scripts.com/php_ini_copy or copy php.ini manually to all sub-directories.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Some shared hosts use suPHP, which requires a slightly different configuration&#039;&#039;&#039;. If everything else fails, try creating the following two files and uploading to your moodle root directory&lt;br /&gt;
:php.ini (sample):&lt;br /&gt;
 register_globals = 0&lt;br /&gt;
 display_errors = 0&lt;br /&gt;
&lt;br /&gt;
:.htaccess (sample):&lt;br /&gt;
 suPHP_ConfigPath /home/cPanelName/public_html/moodle&lt;br /&gt;
&lt;br /&gt;
Change the above path to the actual path to your moodle install.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note&#039;&#039;&#039;: Use a .htaccess file only [http://httpd.apache.org/docs/1.3/howto/htaccess.html#when as a last resort] as it can have an impact on the performance of your Moodle site and cause pages to load slowly on your browser.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating an empty database ===&lt;br /&gt;
&lt;br /&gt;
You need to create an empty database (eg &amp;quot;&#039;&#039;moodle&#039;&#039;&amp;quot;) in your database system along with a special user (eg &amp;quot;moodleuser&amp;quot;) that has access to that database (and that database only). You could use the &amp;quot;root&amp;quot; user if you wanted to for a test server, but this is not recommended for a production system: if hackers manage to discover the password then your whole database system would be at risk, rather than just one database.&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;Warning&#039;&#039;&#039;: Bear in mind that, as of Moodle version 1.5.x, Moodle doesn&#039;t work with MySQL 5.x&#039;s strict mode setting (STRICT_TRANS_TABLES and/or STRICT_ALL_TABLES) -- see [http://moodle.org/mod/forum/discuss.php?d=58552 forum discussion]. So if you are using MySQL 5.x, edit MySQL&#039;s configuration file (called &amp;quot;my.ini&amp;quot; in Windows and &amp;quot;my.cnf&amp;quot; on Unix/Linux) and comment out that option or set it to &amp;lt;code&amp;gt;sql-mode=&#039;&#039;&amp;lt;/code&amp;gt;. You have to restart MySQL after changing this setting. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; If you do not have access to your server, use PHPMyAdmin (or another MySQL client) and enter the command &amp;lt;code&amp;gt;SET @@global.sql_mode=&#039;&#039;;&amp;lt;/code&amp;gt; (be sure to use single quotes, and don&#039;t forget the semicolon).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
====Using a hosted server====&lt;br /&gt;
If you are using a webhost, they will probably have a control panel web interface for you to create your database.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;[http://www.cpanel.com/ cPanel]&#039;&#039;&#039; system is one of the most popular of these. &lt;br /&gt;
To create a database using cPanel:&lt;br /&gt;
&lt;br /&gt;
# Click on the &#039;&#039;&#039;MySQL Databases&#039;&#039;&#039; icon.&lt;br /&gt;
# Type &#039;&#039;&#039;moodle&#039;&#039;&#039; in the New Database field and click &#039;&#039;&#039;Create Database&#039;&#039;&#039;.&lt;br /&gt;
# Type a &#039;&#039;username&#039;&#039; and &#039;&#039;password&#039;&#039; (not one you use elsewhere) in the respective fields and click &#039;&#039;&#039;Create  User&#039;&#039;&#039;.&amp;lt;br&amp;gt;Note that the &#039;&#039;username&#039;&#039; and &#039;&#039;database&#039;&#039; names may be prefixed by your cPanel account name and an underscore, and truncated to 16 characters. When entering this information into the Moodle installer - use the full names.&lt;br /&gt;
# Now use the &#039;&#039;&#039;Add Users to Databases&#039;&#039;&#039; button and give this new user account &#039;&#039;&#039;ALL&#039;&#039;&#039; rights to the new database.&lt;br /&gt;
&lt;br /&gt;
Continue with [[Installing_Moodle#Creating_the_data_directory |Creating the data directory]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Using a SQLite database====&lt;br /&gt;
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.&lt;br /&gt;
&lt;br /&gt;
Moodle 2.0 offers support for SQLite3 database installations. In this case, no database setup is required. The database file will be created by the installation script. By default, the database file will be store in Moodle&#039;s data directory (see [[Installing_Moodle#Creating_the_data_directory |Creating the data directory]]). During install, the web server must have write access on the directory where the database file will be stored. After installation, the web server must have read-write access to the database file.&lt;br /&gt;
&lt;br /&gt;
Continue with [[Installing_Moodle#Creating_the_data_directory |Creating the data directory]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Using the command line====&lt;br /&gt;
&lt;br /&gt;
If you have access to Unix or Windows command lines then you can do the same sort of thing by typing commands. You should do this using the MySQL Client program as follows (commands which you type-in are shown in bold):&lt;br /&gt;
&lt;br /&gt;
- Start the MySQL Client program:&lt;br /&gt;
 #&#039;&#039;&#039;mysql -u root -p&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 2 to server version: 5.0.22-log&lt;br /&gt;
 &lt;br /&gt;
 Type &#039;help;&#039; or &#039;\h&#039; for help. Type &#039;\c&#039; to clear the buffer.&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- The prompt changes to &amp;quot;mysql&amp;gt;&amp;quot; to indicate that you are now working in the MySQL Client program. When working in MySQL, all commands which you type-in must end in a semi-colon. (If you hit the Enter key without the final semi-colon, you&#039;ll get the line continuation symbol &#039;-&amp;gt;&#039;; this is your second chance to type the semi-colon and hit Enter.) &lt;br /&gt;
&lt;br /&gt;
- Begin by checking for any existing databases called &amp;quot;moodle&amp;quot; - if there are any you should change the name in all the commands which follow:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;SHOW DATABASES;&#039;&#039;&#039;&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | Database                |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | information_schema      |&lt;br /&gt;
 | mysql                   |&lt;br /&gt;
 | test                    |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 3 rows in set (0.03 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a database to store the Moodle tables. We&#039;ll call this &amp;quot;moodle&amp;quot;, as there are none with that name already in the above list, but change it if you need to.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;CREATE DATABASE moodle;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Change the default character set and collation of the &amp;quot;moodle&amp;quot; database to UTF8. Leave this out if you are installing Moodle 1.5 or earlier):&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a username and password to access the database &amp;quot;moodle&amp;quot; and grant database access permissions. We&#039;ll call the user &amp;quot;moodleuser&amp;quot; and set the password as &amp;quot;yourpassword&amp;quot;. It&#039;s a good idea to change these for your installation however most people keep the username as &amp;quot;moodleuser&amp;quot;. Remember the username and password you have set, as you&#039;ll need it in the configuration screens later. This is a long command so has been split over several lines by pressing the Return key.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;DROP,INDEX,ALTER ON moodle.*&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;TO moodleuser@localhost IDENTIFIED BY &#039;yourpassword&#039;;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Security Warnings&#039;&#039;&#039;: Never leave the password as the one shown here. Make sure you have a strong password (a mixture of letters and numbers, upper and lower case). Avoid granting &amp;quot;ALL&amp;quot; permissions on the database.&lt;br /&gt;
: &#039;&#039;&#039;Note&#039;&#039;&#039;: For MySQL 4.0.1 or earlier, you don&#039;t need the CREATE TEMPORARY TABLES permission. &lt;br /&gt;
&lt;br /&gt;
- Exit the MySQL Client program:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;QUIT&#039;&#039;&#039;&lt;br /&gt;
 Bye&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
- Reload the grant tables using the mysqladmin program:&lt;br /&gt;
 #&#039;&#039;&#039;mysqladmin -u root -p reload&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
And some example command lines for PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
   # su - postgres&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create user moodleuser createdb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create database moodle &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;with encoding &#039;unicode&#039;&amp;lt;/font&amp;gt;;&amp;quot; -U moodleuser template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser nocreatedb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser with encrypted password &#039;yourpassword&#039;;&amp;quot; template1&lt;br /&gt;
   &amp;gt; su - root&lt;br /&gt;
   # /etc/init.d/postgresql reload&lt;br /&gt;
&lt;br /&gt;
If the Postgres create database command above (&amp;gt;psql -c &amp;quot;create database moodle...&amp;quot;) gives an error message you may want to try:&lt;br /&gt;
 psql -c &amp;quot;create database moodle with template=template1 encoding = &#039;unicode&#039; owner =  moodleuser &amp;lt;br&amp;gt;     location = &#039;/var/mydata&#039;;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If the create database command asks you for a password, run the line containing &#039;encrypted password&#039; first before proceeding.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
* Step-by-step instructions on  [https://docs.moodle.org/en/Step-by-step_Install_Guide_for_Ubuntu installation for Ubuntu(Debian)]&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the data directory  ===&lt;br /&gt;
&lt;br /&gt;
Moodle will also need some space on your server&#039;s hard disk to store uploaded files, such as course documents and user pictures. The Moodle installer tries hard to create the &#039;&#039;&#039;moodledata&#039;&#039;&#039; directory for you but if it fails then you will have to create a directory for this purpose manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Security warning&#039;&#039;&#039;: For security purposes, it is &#039;&#039;&#039;CRITICAL&#039;&#039;&#039; that this directory is &#039;&#039;&#039;NOT&#039;&#039;&#039; accessible directly via the web. The easiest way to do this is to simply locate it OUTSIDE the web site root directory (it is the folder that the main part of your URL -that is, the part up to the first single / - points to; for example, in &amp;lt;nowiki&amp;gt;http://your.domain.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;, it is &amp;lt;nowiki&amp;gt;http://your.domain.com/&amp;lt;/nowiki&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
But if you must have it in the web directory (and you are using Apache AND the web server configuration allows .htaccess files to restrict access to directories) then protect it by creating a file in the data directory called &#039;&#039;&#039;.htaccess&#039;&#039;&#039;, containing these lines:&lt;br /&gt;
&lt;br /&gt;
 order deny,allow&lt;br /&gt;
 deny from all&lt;br /&gt;
&lt;br /&gt;
If you are using IIS, you need to edit the properties of the data directory (from the Internet Information Services Manager console) and deny access to that folder to everybody from the web.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you don&#039;t protect the data directory from direct web access, anybody will be able to impersonate any user of your Moodle site (including the admin user!!!), and all of your course materials will be available to the web at large.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ownership &amp;amp; Permissions&#039;&#039;&#039;: To make sure that Moodle can save uploaded files in this directory, check that the web server software has permission to read, write and execute in this directory. On Unix machines, this means setting the owner of the directory to be something like &amp;quot;nobody&amp;quot; or &amp;quot;apache&amp;quot;, and then giving that user read, write and execute permissions. As an example, to change the owner to &amp;quot;nobody&amp;quot; you could use:&lt;br /&gt;
&lt;br /&gt;
 chown -R nobody:apache moodledata&lt;br /&gt;
&lt;br /&gt;
To change the permissions so that the owner has read,write and execute permissions, use something like this:&lt;br /&gt;
&lt;br /&gt;
 chmod -R 0770 moodledata&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: If you are receiving permission denied messages, try &#039;&#039;chmod -R 0770 moodledata&#039;&#039; and then adjust the settings so that they are more secure. A more secure setting is &#039;&#039;chmod -R 0750 moodledata&#039;&#039;. According to the comments in config-dist.php, &amp;quot;On hosting systems you might need to make sure that your group has no permissions at all while others have full permissions.&amp;quot; To do this you could use &#039;&#039;chmod -R 707 moodledata&#039;&#039;. See also the [[Security | security page]].&lt;br /&gt;
&lt;br /&gt;
Remember that by default moodle will issue a warning about moodle data directories created inside the web directory, but otherwise this directory can be located where you wish. You can later move or change the location of this directory, but if you do, be sure to edit the setting in the &#039;&#039;&#039;config.php&#039;&#039;&#039; file that sets this; e.g. if moodledata is under a directory called data, then it would look like this:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/data/moodledata&#039;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CPanel and webhosts&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
On cPanel systems you can use the &amp;quot;File Manager&amp;quot; to find the folder, click on it, then choose &amp;quot;Change Permissions&amp;quot;. On many shared hosting servers, you will probably need to restrict all file access to your &amp;quot;group&amp;quot; (to prevent other webhost customers from looking at or changing your files), but provide full read/write access to everyone else (which will allow the web server to access your files). Speak to your server administrator if you are having trouble setting this up securely. In particular it will not be possible to create a usable data directory on sites that use a PHP feature known as &amp;quot;&#039;&#039;&#039;Safe Mode&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Run the installer script to create config.php ==&lt;br /&gt;
&lt;br /&gt;
To run the installer script (install.php), just try to access your Moodle main URL using a web browser, or access &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourserver/install.php&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039; directly.&lt;br /&gt;
&lt;br /&gt;
(The Installer will try to set a session cookie. If you get a popup warning in your browser make sure you accept that cookie!)&lt;br /&gt;
&lt;br /&gt;
Moodle will detect that configuration is necessary and will lead you through some screens to help you create a new configuration file called &#039;&#039;&#039;config.php&#039;&#039;&#039;. At the end of the process Moodle will try and write the file into the right location, otherwise you can press a button to download it from the installer and then upload &#039;&#039;&#039;config.php&#039;&#039;&#039; into the main Moodle directory on the server.&lt;br /&gt;
&lt;br /&gt;
Along the way the installer will test your server environment and give you suggestions about how to fix any problems. For most common issues these suggestions should be sufficient, but if you get stuck, check in the Installation Forum for more help.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Go to the admin page to continue configuration ==&lt;br /&gt;
&lt;br /&gt;
Once the basic config.php has been correctly created in the previous step, trying to access the front page of your site will take you to the &amp;quot;admin&amp;quot; page for the rest of the configuration.&lt;br /&gt;
&lt;br /&gt;
The first time you access this admin page, you will be presented with a GPL &amp;quot;shrink wrap&amp;quot; agreement with which you must agree before you can continue with the setup.&lt;br /&gt;
&lt;br /&gt;
Now Moodle will start setting up your database and creating tables to store data. Firstly, the main database tables are created. You should see a number of SQL statements followed by status messages that look like this:&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE course (&lt;br /&gt;
    id int(10) unsigned NOT NULL auto_increment,&lt;br /&gt;
    category int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    password varchar(50) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    fullname varchar(254) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    shortname varchar(15) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    summary text NOT NULL,&lt;br /&gt;
    format tinyint(4) NOT NULL default &#039;1&#039;,&lt;br /&gt;
    teacher varchar(100) NOT NULL default &#039;Teacher&#039;,&lt;br /&gt;
    startdate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    enddate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    timemodified int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    PRIMARY KEY (id)&lt;br /&gt;
 ) TYPE=MyISAM;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;SUCCESS&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and so on, followed by: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Main databases set up successfully.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see these, then there must have been some problem with the database or the configuration settings you defined in config.php. Check that PHP isn&#039;t in a restricted &amp;quot;Safe Mode&amp;quot; (commercial web hosts sometimes have safe mode turned on). You can check PHP variables by creating a little file containing &#039;&#039;&#039;&amp;lt;?php phpinfo() ?&amp;gt;&#039;&#039;&#039; and looking at it through a browser. Check all these and try this page again.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
You should now see a form where you can define more configuration variables for your installation, such as the default language, SMTP hosts and so on. Don&#039;t worry too much about getting everything right just now - you can always come back and edit these later on using the admin interface. The defaults are designed to be useful and secure for most sites. Scroll down to the bottom and click &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If (and only if) you find yourself getting stuck on this page, unable to continue, then your server probably has what I call the &amp;quot;buggy referrer&amp;quot; problem. This is easy to fix: just turn off the &amp;quot;secureforms&amp;quot; setting, then try to continue again.&lt;br /&gt;
&lt;br /&gt;
Next you will see more pages that print lots of status messages as they set up all the tables required by the various Moodle module. As before, they should all be &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;green&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
The next page is a form where you can define parameters for your Moodle site and the front page, such as the name, format, description and so on. Fill this out (you can always come back and change these later) and then press &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Finally, you will then be asked to create a top-level administration user for future access to the admin pages. Fill out the details with your own name, email etc and then click &amp;quot;Save changes&amp;quot;. Not all the fields are required, but if you miss any important fields you&#039;ll be re-prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you remember the username and password you chose for the administration user account, as they will be necessary to access the administration page in future.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(If for any reason your install is interrupted, or there is a system error of some kind that prevents you from logging in using the admin account, you can usually log in using the default username of &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;, with password &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
Once successful, you will be returned to the home page of your new site! Note the administration links that appear down the left hand side of the page (these items also appear on a separate Admin page) - these items are only visible to you because you are logged in as the admin user. All your further administration of Moodle can now be done using this menu, such as:&lt;br /&gt;
&lt;br /&gt;
* creating and deleting courses&lt;br /&gt;
* creating and editing user accounts&lt;br /&gt;
* administering teacher accounts&lt;br /&gt;
* changing site-wide settings like themes etc&lt;br /&gt;
&lt;br /&gt;
But you are not done installing yet! There is one very important thing still to do (see the next section on cron).&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Installing Moodle Using Command Line ==&lt;br /&gt;
{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
Installing Moodle Using command line is just as easy as installing Moodle using web browser. &lt;br /&gt;
* First Go to the moodle root directory and then to admin directory inside the moodle root. &lt;br /&gt;
&lt;br /&gt;
 $cd /var/www/html/moodle/admin&lt;br /&gt;
&lt;br /&gt;
* Then simply use the following syntax to run the moodle command line installer (this is a long command which has been split over 3 lines, so type as one line)&lt;br /&gt;
 $php cliupgrade.php --lang=en --webaddr=&amp;lt;nowiki&amp;gt;http://www.example.com&amp;lt;/nowiki&amp;gt; --moodledir=/var/www/html/moodle &lt;br /&gt;
                     --datadir=/var/moodledata --dbtype=mysql --dbhost=localhost --dbname=moodle &lt;br /&gt;
                     --dbuser=root --prefix=mdl --verbose=1 --interactivelevel=2 &lt;br /&gt;
&lt;br /&gt;
More information about the options can be found using &lt;br /&gt;
$php cliupgrad.php --help&lt;br /&gt;
&lt;br /&gt;
Then you will see the following list of available options&lt;br /&gt;
&lt;br /&gt;
 --lang		 		Valid installed language for installation. Default is English(en)&lt;br /&gt;
 --webaddr			Web address for the Moodle site&lt;br /&gt;
 --moodledir			Location of the moodle web folder&lt;br /&gt;
 --datadir			Location of the moodle data folder (should not be web visible)&lt;br /&gt;
 --dbtype			Database type. Default it mysql&lt;br /&gt;
 --dbhost			Database host. Default localhost&lt;br /&gt;
 --dbname			Database name. Default is moodle&lt;br /&gt;
 --dbuser			Database user. Default is blank&lt;br /&gt;
 --dbpass			Database password. Default is blank&lt;br /&gt;
 --prefix			        Table prefix for above database tables. Default is mdl&lt;br /&gt;
 --verbose			0 No output, 1 Summarized output(Default), 2 Detailed output&lt;br /&gt;
 --interactivelevel	        0 Non interactive, 1 Semi interactive(Default), 2 Interactive&lt;br /&gt;
 --help				print out this help&lt;br /&gt;
&lt;br /&gt;
When you choose non interactive mode without any options all the default values are assumed.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Set up cron ==&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s background tasks (e.g. sending out forum emails and performing course backups) are performed by a script which you can set to execute at specific times of the day. This is known as a cron script. Please refer to the [[Cron|Cron instructions]].&lt;br /&gt;
&lt;br /&gt;
== Set up backups ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[Backup settings| backup instructions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Create a new course ==&lt;br /&gt;
&lt;br /&gt;
Now that Moodle is running properly, you can try creating a new course to play with.&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Create a new course&amp;quot; from the Admin page (or the admin links on the home page).&lt;br /&gt;
&lt;br /&gt;
Fill out the form, paying special attention to the course format. You don&#039;t have to worry about the details too much at this stage, as everything can be changed later by the teacher. Note that the yellow help icons are everywhere to provide contextual help on any aspect.&lt;br /&gt;
&lt;br /&gt;
Press &amp;quot;Save changes&amp;quot;, and you will be taken to a new form where you can assign teachers to the course. You can only add existing user accounts from this form - if you want to create a new teacher account then either ask the teacher to create one for themselves (see the login page), or create one for them using the &amp;quot;Add a new user&amp;quot; on the Admin page.&lt;br /&gt;
&lt;br /&gt;
Once done, the course is ready to customize, and is accessible via the &amp;quot;Courses&amp;quot; link on the home page.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Installation FAQ]]&lt;br /&gt;
* [[Complete install packages]] might be an easier first time installs on some systems&lt;br /&gt;
* Help forum:  [http://moodle.org/mod/forum/view.php?id=28 Installation problems]&lt;br /&gt;
* [[Installing Apache, MySQL and PHP]] - Open source programs that can run Moodle on the web or on a desktop&lt;br /&gt;
* [[Upgrading Moodle]]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=42688 Selecting a web host for Moodle] forum discussion&lt;br /&gt;
* [[masquerading|Masquerading]] - Running Moodle behind a masquerading/NAT firewall&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[cs:Instalace]]&lt;br /&gt;
[[de:Installieren von Moodle]]&lt;br /&gt;
[[es:Instalación de moodle]]&lt;br /&gt;
[[fr:Installation de Moodle]]&lt;br /&gt;
[[ja:Moodleのインストール]]&lt;br /&gt;
[[nl:Installatiegids]]&lt;br /&gt;
[[pl:Instalacja Moodle]]&lt;br /&gt;
[[pt:Instalação do Moodle]]&lt;br /&gt;
[[ru:Установка Moodle]]&lt;br /&gt;
[[sk:Inštalácia]]&lt;br /&gt;
[[zh:安装Moodlezh:]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=44487</id>
		<title>Installing Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=44487"/>
		<updated>2008-09-29T10:32:49Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Using a SQLite database */  fix broken links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Firstly, don&#039;t panic! :-)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This guide explains how to install Moodle for the first time. For some of these steps it goes into a lot of detail to try and cover the majority of possible web server setups, so this page may look long and complicated. Don&#039;t panic, once you know how to do it you can install Moodle in minutes!&lt;br /&gt;
&lt;br /&gt;
If you have problems please read this page carefully - most common issues are answered in here. If you still have trouble, you can seek help from the Moodle community via  [http://moodle.org/course/view.php?id=5 moodle.org Using Moodle].&lt;br /&gt;
&lt;br /&gt;
Another option is to contact a [http://moodle.com/hosting/ Moodle Partner providing Moodle hosting] who can completely maintain Moodle for you, so that you can ignore all this and get straight into educating! A Moodle partner is the preferred option but if you decide to choose a hosting company that has cpanel then [http://ic.eflclasses.org/tutorials/settingupmoodleonhostingwitholdcpanel.swf this tutorial will guide you]  through the process of choosing a host and setting up moodle via the old cpanel. If you have the new cpanel please use this link [http://ic.eflclasses.org/tutorials/settingupmoodleoncpanel.swf this tutorial will guide you].  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; some hosting companies offer one-click moodle install options such as fantastico, which whilst sometimes effective, usually use old (sometimes years old) versions of moodle and sometimes simply don&#039;t work. If one of these goes wrong, your best bet is often to start from scratch following the instructions here yourself. Its almost certainly quicker.&lt;br /&gt;
&lt;br /&gt;
If you want to run Moodle on your own computer and this page looks a bit daunting, then please see our guides on how to install one of Moodle&#039;s complete [[Complete install packages for Windows|Windows packages]], [[Complete Install Packages for Mac OS X|Mac OS packages]] or [[Installing AMP |Installing Apache, MySQL and PHP(AMP)]]. They provide alternative instructions to install all this on most popular platforms.&lt;br /&gt;
&lt;br /&gt;
==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
Moodle is primarily developed in Linux using [[Apache]], [[MySQL]] and [[PHP]] (also sometimes known as the LAMP platform), but is also regularly tested with Windows XP/2000/2003 (WAMP), Solaris 10 (Sparc and x64), Mac OS X and Netware 6 operating systems. Support for PostgreSQL, Oracle and Microsoft SQL Server is also available.&lt;br /&gt;
&lt;br /&gt;
The procedure for installing Moodle on the Windows platform (e.g. Windows Server, IIS and MSSQL) varies slightly to the procedure for the LAMP platform. See [[Installation for Windows 2003 with IIS]] for more details.&lt;br /&gt;
&lt;br /&gt;
[[Installing Moodle on Windows Vista]] might help with &#039;&#039;&#039;Blank page problem while installing Moodle on Windows Vista&#039;&#039;&#039; .&lt;br /&gt;
&lt;br /&gt;
The requirements for Moodle are as follows:&lt;br /&gt;
&lt;br /&gt;
===Hardware === &lt;br /&gt;
* Disk space: 160MB free (min). You will require more free space to store your teaching materials.&lt;br /&gt;
* Memory: 256MB (min), 1GB (recommended). The general rule of thumb is that Moodle can support 50 &#039;&#039;concurrent&#039;&#039; users for every 1GB of RAM, but this will vary depending on your specific hardware and software combination. &lt;br /&gt;
** &#039;&#039;&#039;Note if you are using a hosted account:&#039;&#039;&#039; Most hosted accounts on commercial sites will meet Disk and Memory requirements. However, you should contact your web host&#039;s support desk to check that this is the case before signing-up with them. It is especially important to &#039;&#039;&#039;ask about any PHP memory limits or MySQL question limits&#039;&#039;&#039;. If your prospective host does not provide a service which meets these requirements, or you are already signed up with them, ask them why and consider taking your business elsewhere if they do not change.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
* Web server software. Most people use [[Apache]], but Moodle should work fine under any web server that supports [[PHP]], such as [[IIS]] on Windows platforms. PHP does impose requirements on versions of web servers, however these are complex and the general advice is to use the newest version possible of your chosen web server. &lt;br /&gt;
* PHP scripting language. (Please note that there have been issues installing Moodle with [http://www.php-accelerator.co.uk PHP-Accelerator]). There are currently two versions (or branches) of PHP available: PHP4 and PHP5 and the version requirements are listed below.&lt;br /&gt;
** For Moodle version 1.4 or later: PHP4 (version 4.1.0 or later) or PHP5 (version 5.1.0 or later) are supported.&lt;br /&gt;
** For Moodle version 1.6 or later: the PHP4 (version 4.3.0 or later) or PHP5 (version 5.1.0 or later) are supported. &lt;br /&gt;
** Future Moodle versions 2.0 or later will not support PHP4 and will require PHP5 (version 5.2.4 or later).&lt;br /&gt;
** PHP Settings. Check these settings in your php.ini or .htaccess file (if you&#039;re using Apache). For settings which use ON/OFF as their values, you can substitute 1 for ON and 0 for OFF if you prefer. &lt;br /&gt;
*** &#039;&#039;safe_mode&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;memory_limit&#039;&#039; should be at least 16M (32M is recommended for Moodle 1.7 and 40M for Moodle 1.8 or later). Large sites may need more than 128M. PHP 5.2.x requires higher memory_limit values than previous versions of PHP. 64bit operating systems require even more memory.&lt;br /&gt;
*** &#039;&#039;session.save_handler&#039;&#039; needs to be set to FILES.&lt;br /&gt;
*** &#039;&#039;magic_quotes_gpc&#039;&#039; should be ON. (It will be recommended to turn it off in 2.0.)&lt;br /&gt;
*** &#039;&#039;magic_quotes_runtime&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;file_uploads&#039;&#039; needs to be ON.&lt;br /&gt;
*** &#039;&#039;session.auto_start&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;session.bug_compat_warn&#039;&#039; needs to be OFF.&lt;br /&gt;
** PHP Extensions and libraries&lt;br /&gt;
*** The mbstring extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** The iconv extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** [http://www.libgd.org/ GD library] and the [http://www.freetype.org/ FreeType 2] library and extensions are needed to be able to look at the dynamic graphs that the logs pages make.&lt;br /&gt;
*** The mysql extension is required if you are using the MySQL database. Note that in some Linux distributions (notably Red Hat) this is an optional installation.&lt;br /&gt;
*** The pgsql extension is required if you are using the PostgreSQL database.&lt;br /&gt;
*** The pdo and pdo_sqlite extensions are required for the (experimental) SQLite 3 database support.&lt;br /&gt;
*** The curl extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The tokenizer extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The curl and openssl extensions are required for the Moodle network functionality (Moodle 1.8 or later).&lt;br /&gt;
*** Other PHP extensions may be required to support optional Moodle functionality, especially external authentication and/or enrolment (e.g. LDAP extension for LDAP authentication and the sockets extension for Chat server).&lt;br /&gt;
* A working database server: [[MySQL]] or [[PostgreSQL]] are completely supported and recommended for use with any version of Moodle. Support for Microsoft SQL Server and Oracle has been added in Moodle 1.7. MySQL is &#039;&#039;the&#039;&#039; choice for many people because it is very popular, but there are some [[Arguments in favour of PostgreSQL|arguments in favour of PostgreSQL]], especially if you are planning a large deployment.&lt;br /&gt;
** For Moodle 1.5, MySQL (version 3.23 or later) or PostgreSQL (7.4 or later). &lt;br /&gt;
** For Moodle 1.6, MySQL (version 4.1.12 or later) or PostgreSQL (7.4 or later).&lt;br /&gt;
** For Moodle 1.7, MySQL (version 4.1.12 or later), PostgreSQL (7.4 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
** For Moodle 1.8 or later, MySQL (version 4.1.12 or later), PostgreSQL (8.0 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
: MySQL Notes: For Moodle 1.6 or later, If you use latin languages only you can use MySQL 4.1.12. If you are using non-latin languages you require MySQL 4.1.16 or later. Currently the MySQL setting &amp;quot;strict mode&amp;quot; must be OFF (set to &amp;quot;&amp;quot; or &amp;quot;MYSQL40&amp;quot;) in the MySQL configuration file. &lt;br /&gt;
: PostgreSQL Notes: PostgreSQL 7.4 is recommended for earlier Moodle versions, since Moodle 1.8 only PostgreSQL 8.0 and above are supported.&lt;br /&gt;
* For showcases or low to medium-sized installations, Moodle 2.0 also includes (experimental) support for SQLite 3 database. This setup requires no database server, as the database file is stored in a local directory on the server.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== How many users? ==&lt;br /&gt;
&lt;br /&gt;
In addition to the hardware and software requirements, you will also need to think about the capacity of your Moodle installation in terms of the number of users it can handle. There are two numbers to plan for:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Browsing users&#039;&#039;&#039;: the maximum number of users able to browse your Moodle site. This is the number of computers in your organization or on your course (whichever is greater).&lt;br /&gt;
:&#039;&#039;&#039;Concurrent database users&#039;&#039;&#039;: the maximum number of concurrent database users (needed for Moodle activities such as quizzes). This is the number of users who will be using Moodle at the same time. In an educational institution, use your timetable/roster to obtain this figure.&lt;br /&gt;
&lt;br /&gt;
Once you know these figures for your users, you can start work out if your Moodle installation can support this capacity. The exact number of users depends on your hardware/software/network combination. Usually the amount of memory installed (RAM) is the deciding factor but a faster overall processor speed will also help in reducing waiting times for pages to load. &lt;br /&gt;
&lt;br /&gt;
The general rule of thumb for a single server is that the approx max concurrent users = RAM (GB) * 50 and the approx max browsing users = Approx max concurrent users * 5. As an example, a university with 500 total computers on campus and 100 concurrent users at any time will need approx 2GB of RAM on the one server to support the number of concurrent users.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note if you are using a hosted account&#039;&#039;&#039;: Ask your provider what limits are placed on the number of concurrent database connections and the processor load. This will give a good estimate of the number of users your Moodle install can manage.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note:&#039;&#039;&#039; As of August 31, 2007, Moodle 1.8.2+ is not recommended for large installations, especially if you have large number (e.g. 20,000+) of courses. The main reason is the codes related to ROLES are still not fully optimized with database queries and still need some work. If you are planning to use 1.8.x codes for a larger institution, please make sure that you have sufficient time to do your own testing and performance profiling.  Upgrade to Moodle 1.9!!&lt;br /&gt;
&lt;br /&gt;
[Update|Updating from a previous version] of Moodle has been improved quite a bit from 1.8.3+ version (see this thread discussion: http://moodle.org/mod/forum/discuss.php?d=83281).  Moodle 1.9 has even more improvements in all areas and is the recommended version.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Download and copy files into place ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to get Moodle, either as a compressed package or via [[CVS]]. &lt;br /&gt;
&lt;br /&gt;
=== Download from compressed packages===&lt;br /&gt;
There are two types of compressed packages at the [http://download.moodle.org/ download.moodle.org page:] which offer a variety of version, operating systems and compression types.&lt;br /&gt;
#The &amp;quot;Standard Distribution&amp;quot; (with Moodle only files) and &lt;br /&gt;
#Several operating system &amp;quot;Complete Install Packages&amp;quot; (which contains programs to create a Moodle in a web environment). Please see [[Complete install packages]] for more information.  &lt;br /&gt;
&lt;br /&gt;
Most of these instructions are for the standard distribution, &lt;br /&gt;
Download a compressed package and then unpack the archive into your file structure using either of these two commands:&lt;br /&gt;
 tar -zxvf [filename]&lt;br /&gt;
 unzip [filename]&lt;br /&gt;
&lt;br /&gt;
===Download from CVS===&lt;br /&gt;
To use CVS, helpful instructions are available at the [[CVS_for_Administrators | CVS for Administrators]] page. The full [http://cvs.moodle.org/moodle/ Moodle CVS repository] is also available for browsing. &lt;br /&gt;
&lt;br /&gt;
If you are using CVS, run the CVS Checkout command.&lt;br /&gt;
&lt;br /&gt;
===Directory created placement===&lt;br /&gt;
After either of the above processes, you will now have with a directory called &amp;quot;moodle&amp;quot;, containing a number of files and folders.&lt;br /&gt;
&lt;br /&gt;
For the standard package, you can either place the whole folder in your web server documents directory, in which case the site will be located at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com/moodle&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;, or you can copy all the contents straight into the main web server documents directory, in which case the site will be simply &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip&#039;&#039;&#039;: If you are downloading Moodle to your local computer and then uploading it to your web site, it is usually better to upload the whole archive as one file, and then do the unpacking on the server. Even web hosting interfaces like cPanel allow you to uncompress archives in the &amp;quot;File Manager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Structure of moodle directory ===&lt;br /&gt;
&lt;br /&gt;
You can safely skip this section, but here is a quick summary of the contents of the Moodle folder, to help get you oriented:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;config.php&#039;&#039; - contains basic settings. This file does not come with Moodle - you will create it by executing install.php or manually.&lt;br /&gt;
:&#039;&#039;install.php&#039;&#039; - the script you will run to create config.php&lt;br /&gt;
:&#039;&#039;version.php&#039;&#039; - defines the current version of Moodle code&lt;br /&gt;
:&#039;&#039;index.php&#039;&#039; - the front page of the site&lt;br /&gt;
:&#039;&#039;admin/&#039;&#039; - code to administrate the whole server&lt;br /&gt;
:&#039;&#039;auth/&#039;&#039; - plugin modules to authenticate users&lt;br /&gt;
:&#039;&#039;blocks/&#039;&#039; - plugin modules for the little side blocks on many pages&lt;br /&gt;
:&#039;&#039;calendar/&#039;&#039; - all the code for managing and displaying calendars&lt;br /&gt;
:&#039;&#039;course/&#039;&#039; - code to display and manage courses&lt;br /&gt;
:&#039;&#039;doc/&#039;&#039; - help documentation for Moodle (eg this page)&lt;br /&gt;
:&#039;&#039;files/&#039;&#039; - code to display and manage uploaded files&lt;br /&gt;
:&#039;&#039;lang/&#039;&#039; - texts in different languages, one directory per language&lt;br /&gt;
:&#039;&#039;lib/&#039;&#039; - libraries of core Moodle code&lt;br /&gt;
:&#039;&#039;login/&#039;&#039; - code to handle login and account creation&lt;br /&gt;
:&#039;&#039;mod/&#039;&#039; - all the main Moodle course modules are in here&lt;br /&gt;
:&#039;&#039;pix/&#039;&#039; - generic site graphics&lt;br /&gt;
:&#039;&#039;theme/&#039;&#039; - theme packs/skins to change the look of the site.&lt;br /&gt;
:&#039;&#039;user/&#039;&#039; - code to display and manage users&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Setting-up your system==&lt;br /&gt;
To ensure that Moodle will install successfully, you need to check that the web server settings are correct, then create a blank database for Moodle to use and finally create a directory on your hard disk for Moodle to save your materials and other files you upload into your courses.&lt;br /&gt;
&lt;br /&gt;
=== Check web server settings ===&lt;br /&gt;
&lt;br /&gt;
*Firstly, make sure that your web server is set up to use index.php as a default page (perhaps in addition to index.html, default.htm and so on). In Apache, this is done using a DirectoryIndex parameter in your httpd.conf file. Mine usually looks like this:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;DirectoryIndex&#039;&#039;&#039; index.php index.html index.htm&lt;br /&gt;
&lt;br /&gt;
:Just make sure index.php is in the list (and preferably towards the start of the list, for efficiency).&lt;br /&gt;
&lt;br /&gt;
*Secondly, &#039;&#039;&#039;if you are using Apache 2&#039;&#039;&#039;, then you should turn on the &#039;&#039;AcceptPathInfo&#039;&#039; variable, which allows scripts to be passed arguments like &amp;lt;nowiki&amp;gt;http://server/file.php/arg1/arg2&amp;lt;/nowiki&amp;gt;. This is essential to allow relative links between your resources, and also provides a performance boost for people using your Moodle web site. You can turn this on by adding these lines to your httpd.conf file. (NB: This setting, or any equivalent, is not required in Apache 1)&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
=== Recheck PHP settings ===&lt;br /&gt;
Moodle requires a number of PHP settings to be active for it to work. These were given in the Requirements section and &#039;&#039;&#039;On most servers these will already be the default settings&#039;&#039;&#039;.  However, some PHP servers (and some of the more recent PHP versions) may have things set differently, so it is useful to double-check that the settings are correct. These are defined in PHP&#039;s configuration file (usually called &#039;&#039;&#039;php.ini&#039;&#039;&#039;) or in the Apache &#039;&#039;&#039;.htaccess&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
 safe_mode = 0 (necessary)&lt;br /&gt;
 memory_limit = 40M (varies: minimum 16M, 32M Moodle v1.7, 40M Moodle v1.8, 128M large sites)&lt;br /&gt;
 session.save_handler = files (unless you are using another handler, e.g. mm)   &lt;br /&gt;
 magic_quotes_gpc = 1    (preferred but not necessary, 0 will be recommended in 2.0)&lt;br /&gt;
 magic_quotes_runtime = 0    (necessary)&lt;br /&gt;
 file_uploads = 1&lt;br /&gt;
 session.auto_start = 0&lt;br /&gt;
 session.bug_compat_warn = 0&lt;br /&gt;
&lt;br /&gt;
You may also want to set other, optional php.ini file settings while you are already editing it. For instance, you may want to reset the maximum upload size of file attachments, which usually defaults to 2M(egabytes). For instance, to set these to 16 Megabytes:&lt;br /&gt;
 &lt;br /&gt;
 post_max_size = 16M&lt;br /&gt;
 upload_max_filesize = 16M&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Using a .htaccess file for webserver and PHP settings ===&lt;br /&gt;
&lt;br /&gt;
Use the above if you can directly edit your server&#039;s files, but if you are setting-up Moodle on a webhost, or don&#039;t have access to &#039;&#039;&#039;httpd.conf&#039;&#039;&#039; or &#039;&#039;&#039;php.ini&#039;&#039;&#039; on your server, or you have Moodle on a server with other applications that require different settings, then don&#039;t worry, you can often still override the default settings. This only works on Apache servers and only when Overrides have been allowed in the main Apache configuration. Moodle is supplied with a htaccess file which you can use, or you can create your own file manually.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Use the default htaccess file&#039;&#039;&#039;. The easiest thing to do is just copy the sample file from moodle/lib/htaccess and edit it to suit your needs. It contains further instructions. For example, in a Unix shell:&lt;br /&gt;
&lt;br /&gt;
 cd moodle&lt;br /&gt;
 cp moodle/lib/htaccess .htaccess&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Create your own file&#039;&#039;&#039;. Alternatively you can create your own file called &#039;&#039;&#039;.htaccess&#039;&#039;&#039; in Moodle&#039;s main directory that contains lines like the following. &lt;br /&gt;
&lt;br /&gt;
 DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 php_value memory_limit 40M (adjust to your version of Moodle)&lt;br /&gt;
 php_flag magic_quotes_gpc 1&lt;br /&gt;
 php_flag magic_quotes_runtime 0&lt;br /&gt;
 php_flag file_uploads 1&lt;br /&gt;
 php_flag session.auto_start 0&lt;br /&gt;
 php_flag session.bug_compat_warn 0&lt;br /&gt;
&lt;br /&gt;
:If you have Apache version 2 installed, add these lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;IfDefine APACHE2&amp;gt;&lt;br /&gt;
     AcceptPathInfo on&lt;br /&gt;
 &amp;lt;/IfDefine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Otherwise add this single line:&lt;br /&gt;
&lt;br /&gt;
 AcceptPathInfo on&lt;br /&gt;
&lt;br /&gt;
:Optionally, you can also do things like define the maximum size for uploaded files, etc by adding these lines:&lt;br /&gt;
&lt;br /&gt;
 LimitRequestBody 0&lt;br /&gt;
 php_value upload_max_filesize 2M&lt;br /&gt;
 php_value post_max_size 2M&lt;br /&gt;
&lt;br /&gt;
:The value given in these lines is 2M. You may want to change this at a later date to allow uploading of larger files.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Some shared hosts do not allow .htaccess files&#039;&#039;&#039;. In this case, it may be necessary to place a php.ini file within each sub-directory of the site. To do this, you use your editor to create a php.ini file in the main moodle directory and later copy it to all sub-directories. The syntax for the php.ini file is different than the one used in .htaccess - you do not use the php_value and php_flag prefixes. See the example below:&lt;br /&gt;
 upload_max_filesize = 2M&lt;br /&gt;
 post_max_size = 2M&lt;br /&gt;
:After creating the php.ini file with all of the statements you need, run the script http://tips-scripts.com/php_ini_copy or copy php.ini manually to all sub-directories.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Some shared hosts use suPHP, which requires a slightly different configuration&#039;&#039;&#039;. If everything else fails, try creating the following two files and uploading to your moodle root directory&lt;br /&gt;
:php.ini (sample):&lt;br /&gt;
 register_globals = 0&lt;br /&gt;
 display_errors = 0&lt;br /&gt;
&lt;br /&gt;
:.htaccess (sample):&lt;br /&gt;
 suPHP_ConfigPath /home/cPanelName/public_html/moodle&lt;br /&gt;
&lt;br /&gt;
Change the above path to the actual path to your moodle install.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note&#039;&#039;&#039;: Use a .htaccess file only [http://httpd.apache.org/docs/1.3/howto/htaccess.html#when as a last resort] as it can have an impact on the performance of your Moodle site and cause pages to load slowly on your browser.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating an empty database ===&lt;br /&gt;
&lt;br /&gt;
You need to create an empty database (eg &amp;quot;&#039;&#039;moodle&#039;&#039;&amp;quot;) in your database system along with a special user (eg &amp;quot;moodleuser&amp;quot;) that has access to that database (and that database only). You could use the &amp;quot;root&amp;quot; user if you wanted to for a test server, but this is not recommended for a production system: if hackers manage to discover the password then your whole database system would be at risk, rather than just one database.&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;Warning&#039;&#039;&#039;: Bear in mind that, as of Moodle version 1.5.x, Moodle doesn&#039;t work with MySQL 5.x&#039;s strict mode setting (STRICT_TRANS_TABLES and/or STRICT_ALL_TABLES) -- see [http://moodle.org/mod/forum/discuss.php?d=58552 forum discussion]. So if you are using MySQL 5.x, edit MySQL&#039;s configuration file (called &amp;quot;my.ini&amp;quot; in Windows and &amp;quot;my.cnf&amp;quot; on Unix/Linux) and comment out that option or set it to &amp;lt;code&amp;gt;sql-mode=&#039;&#039;&amp;lt;/code&amp;gt;. You have to restart MySQL after changing this setting. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; If you do not have access to your server, use PHPMyAdmin (or another MySQL client) and enter the command &amp;lt;code&amp;gt;SET @@global.sql_mode=&#039;&#039;;&amp;lt;/code&amp;gt; (be sure to use single quotes, and don&#039;t forget the semicolon).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
====Using a hosted server====&lt;br /&gt;
If you are using a webhost, they will probably have a control panel web interface for you to create your database.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;[http://www.cpanel.com/ cPanel]&#039;&#039;&#039; system is one of the most popular of these. &lt;br /&gt;
To create a database using cPanel:&lt;br /&gt;
&lt;br /&gt;
# Click on the &#039;&#039;&#039;MySQL Databases&#039;&#039;&#039; icon.&lt;br /&gt;
# Type &#039;&#039;&#039;moodle&#039;&#039;&#039; in the New Database field and click &#039;&#039;&#039;Create Database&#039;&#039;&#039;.&lt;br /&gt;
# Type a &#039;&#039;username&#039;&#039; and &#039;&#039;password&#039;&#039; (not one you use elsewhere) in the respective fields and click &#039;&#039;&#039;Create  User&#039;&#039;&#039;.&amp;lt;br&amp;gt;Note that the &#039;&#039;username&#039;&#039; and &#039;&#039;database&#039;&#039; names may be prefixed by your cPanel account name and an underscore, and truncated to 16 characters. When entering this information into the Moodle installer - use the full names.&lt;br /&gt;
# Now use the &#039;&#039;&#039;Add Users to Databases&#039;&#039;&#039; button and give this new user account &#039;&#039;&#039;ALL&#039;&#039;&#039; rights to the new database.&lt;br /&gt;
&lt;br /&gt;
Continue with [[Installing_Moodle#CreatDataDir |Creating the data directory]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
====Using a SQLite database====&lt;br /&gt;
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.&lt;br /&gt;
&lt;br /&gt;
Moodle 2.0 offers support for SQLite3 database installations. In this case, no database setup is required. The database file will be created by the installation script. By default, the database file will be store in Moodle&#039;s data directory (see [[Installing_Moodle#Creating_the_data_directory |Creating the data directory]]). During install, the web server must have write access on the directory where the database file will be stored. After installation, the web server must have read-write access to the database file.&lt;br /&gt;
&lt;br /&gt;
Continue with [[Installing_Moodle#Creating_the_data_directory |Creating the data directory]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Using the command line====&lt;br /&gt;
&lt;br /&gt;
If you have access to Unix or Windows command lines then you can do the same sort of thing by typing commands. You should do this using the MySQL Client program as follows (commands which you type-in are shown in bold):&lt;br /&gt;
&lt;br /&gt;
- Start the MySQL Client program:&lt;br /&gt;
 #&#039;&#039;&#039;mysql -u root -p&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 2 to server version: 5.0.22-log&lt;br /&gt;
 &lt;br /&gt;
 Type &#039;help;&#039; or &#039;\h&#039; for help. Type &#039;\c&#039; to clear the buffer.&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- The prompt changes to &amp;quot;mysql&amp;gt;&amp;quot; to indicate that you are now working in the MySQL Client program. When working in MySQL, all commands which you type-in must end in a semi-colon. (If you hit the Enter key without the final semi-colon, you&#039;ll get the line continuation symbol &#039;-&amp;gt;&#039;; this is your second chance to type the semi-colon and hit Enter.) &lt;br /&gt;
&lt;br /&gt;
- Begin by checking for any existing databases called &amp;quot;moodle&amp;quot; - if there are any you should change the name in all the commands which follow:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;SHOW DATABASES;&#039;&#039;&#039;&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | Database                |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | information_schema      |&lt;br /&gt;
 | mysql                   |&lt;br /&gt;
 | test                    |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 3 rows in set (0.03 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a database to store the Moodle tables. We&#039;ll call this &amp;quot;moodle&amp;quot;, as there are none with that name already in the above list, but change it if you need to.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;CREATE DATABASE moodle;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Change the default character set and collation of the &amp;quot;moodle&amp;quot; database to UTF8. Leave this out if you are installing Moodle 1.5 or earlier):&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a username and password to access the database &amp;quot;moodle&amp;quot; and grant database access permissions. We&#039;ll call the user &amp;quot;moodleuser&amp;quot; and set the password as &amp;quot;yourpassword&amp;quot;. It&#039;s a good idea to change these for your installation however most people keep the username as &amp;quot;moodleuser&amp;quot;. Remember the username and password you have set, as you&#039;ll need it in the configuration screens later. This is a long command so has been split over several lines by pressing the Return key.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;DROP,INDEX,ALTER ON moodle.*&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;TO moodleuser@localhost IDENTIFIED BY &#039;yourpassword&#039;;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Security Warnings&#039;&#039;&#039;: Never leave the password as the one shown here. Make sure you have a strong password (a mixture of letters and numbers, upper and lower case). Avoid granting &amp;quot;ALL&amp;quot; permissions on the database.&lt;br /&gt;
: &#039;&#039;&#039;Note&#039;&#039;&#039;: For MySQL 4.0.1 or earlier, you don&#039;t need the CREATE TEMPORARY TABLES permission. &lt;br /&gt;
&lt;br /&gt;
- Exit the MySQL Client program:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;QUIT&#039;&#039;&#039;&lt;br /&gt;
 Bye&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
- Reload the grant tables using the mysqladmin program:&lt;br /&gt;
 #&#039;&#039;&#039;mysqladmin -u root -p reload&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
And some example command lines for PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
   # su - postgres&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create user moodleuser createdb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create database moodle &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;with encoding &#039;unicode&#039;&amp;lt;/font&amp;gt;;&amp;quot; -U moodleuser template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser nocreatedb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser with encrypted password &#039;yourpassword&#039;;&amp;quot; template1&lt;br /&gt;
   &amp;gt; su - root&lt;br /&gt;
   # /etc/init.d/postgresql reload&lt;br /&gt;
&lt;br /&gt;
If the Postgres create database command above (&amp;gt;psql -c &amp;quot;create database moodle...&amp;quot;) gives an error message you may want to try:&lt;br /&gt;
 psql -c &amp;quot;create database moodle with template=template1 encoding = &#039;unicode&#039; owner =  moodleuser &amp;lt;br&amp;gt;     location = &#039;/var/mydata&#039;;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If the create database command asks you for a password, run the line containing &#039;encrypted password&#039; first before proceeding.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
* Step-by-step instructions on  [https://docs.moodle.org/en/Step-by-step_Install_Guide_for_Ubuntu installation for Ubuntu(Debian)]&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the data directory  ===&lt;br /&gt;
&lt;br /&gt;
Moodle will also need some space on your server&#039;s hard disk to store uploaded files, such as course documents and user pictures. The Moodle installer tries hard to create the &#039;&#039;&#039;moodledata&#039;&#039;&#039; directory for you but if it fails then you will have to create a directory for this purpose manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Security warning&#039;&#039;&#039;: For security purposes, it is &#039;&#039;&#039;CRITICAL&#039;&#039;&#039; that this directory is &#039;&#039;&#039;NOT&#039;&#039;&#039; accessible directly via the web. The easiest way to do this is to simply locate it OUTSIDE the web site root directory (it is the folder that the main part of your URL -that is, the part up to the first single / - points to; for example, in &amp;lt;nowiki&amp;gt;http://your.domain.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;, it is &amp;lt;nowiki&amp;gt;http://your.domain.com/&amp;lt;/nowiki&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
But if you must have it in the web directory (and you are using Apache AND the web server configuration allows .htaccess files to restrict access to directories) then protect it by creating a file in the data directory called &#039;&#039;&#039;.htaccess&#039;&#039;&#039;, containing these lines:&lt;br /&gt;
&lt;br /&gt;
 order deny,allow&lt;br /&gt;
 deny from all&lt;br /&gt;
&lt;br /&gt;
If you are using IIS, you need to edit the properties of the data directory (from the Internet Information Services Manager console) and deny access to that folder to everybody from the web.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you don&#039;t protect the data directory from direct web access, anybody will be able to impersonate any user of your Moodle site (including the admin user!!!), and all of your course materials will be available to the web at large.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ownership &amp;amp; Permissions&#039;&#039;&#039;: To make sure that Moodle can save uploaded files in this directory, check that the web server software has permission to read, write and execute in this directory. On Unix machines, this means setting the owner of the directory to be something like &amp;quot;nobody&amp;quot; or &amp;quot;apache&amp;quot;, and then giving that user read, write and execute permissions. As an example, to change the owner to &amp;quot;nobody&amp;quot; you could use:&lt;br /&gt;
&lt;br /&gt;
 chown -R nobody:apache moodledata&lt;br /&gt;
&lt;br /&gt;
To change the permissions so that the owner has read,write and execute permissions, use something like this:&lt;br /&gt;
&lt;br /&gt;
 chmod -R 0770 moodledata&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: If you are receiving permission denied messages, try &#039;&#039;chmod -R 0770 moodledata&#039;&#039; and then adjust the settings so that they are more secure. A more secure setting is &#039;&#039;chmod -R 0750 moodledata&#039;&#039;. According to the comments in config-dist.php, &amp;quot;On hosting systems you might need to make sure that your group has no permissions at all while others have full permissions.&amp;quot; To do this you could use &#039;&#039;chmod -R 707 moodledata&#039;&#039;. See also the [[Security | security page]].&lt;br /&gt;
&lt;br /&gt;
Remember that by default moodle will issue a warning about moodle data directories created inside the web directory, but otherwise this directory can be located where you wish. You can later move or change the location of this directory, but if you do, be sure to edit the setting in the &#039;&#039;&#039;config.php&#039;&#039;&#039; file that sets this; e.g. if moodledata is under a directory called data, then it would look like this:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/data/moodledata&#039;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CPanel and webhosts&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
On cPanel systems you can use the &amp;quot;File Manager&amp;quot; to find the folder, click on it, then choose &amp;quot;Change Permissions&amp;quot;. On many shared hosting servers, you will probably need to restrict all file access to your &amp;quot;group&amp;quot; (to prevent other webhost customers from looking at or changing your files), but provide full read/write access to everyone else (which will allow the web server to access your files). Speak to your server administrator if you are having trouble setting this up securely. In particular it will not be possible to create a usable data directory on sites that use a PHP feature known as &amp;quot;&#039;&#039;&#039;Safe Mode&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Run the installer script to create config.php ==&lt;br /&gt;
&lt;br /&gt;
To run the installer script (install.php), just try to access your Moodle main URL using a web browser, or access &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourserver/install.php&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039; directly.&lt;br /&gt;
&lt;br /&gt;
(The Installer will try to set a session cookie. If you get a popup warning in your browser make sure you accept that cookie!)&lt;br /&gt;
&lt;br /&gt;
Moodle will detect that configuration is necessary and will lead you through some screens to help you create a new configuration file called &#039;&#039;&#039;config.php&#039;&#039;&#039;. At the end of the process Moodle will try and write the file into the right location, otherwise you can press a button to download it from the installer and then upload &#039;&#039;&#039;config.php&#039;&#039;&#039; into the main Moodle directory on the server.&lt;br /&gt;
&lt;br /&gt;
Along the way the installer will test your server environment and give you suggestions about how to fix any problems. For most common issues these suggestions should be sufficient, but if you get stuck, check in the Installation Forum for more help.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Go to the admin page to continue configuration ==&lt;br /&gt;
&lt;br /&gt;
Once the basic config.php has been correctly created in the previous step, trying to access the front page of your site will take you to the &amp;quot;admin&amp;quot; page for the rest of the configuration.&lt;br /&gt;
&lt;br /&gt;
The first time you access this admin page, you will be presented with a GPL &amp;quot;shrink wrap&amp;quot; agreement with which you must agree before you can continue with the setup.&lt;br /&gt;
&lt;br /&gt;
Now Moodle will start setting up your database and creating tables to store data. Firstly, the main database tables are created. You should see a number of SQL statements followed by status messages that look like this:&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE course (&lt;br /&gt;
    id int(10) unsigned NOT NULL auto_increment,&lt;br /&gt;
    category int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    password varchar(50) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    fullname varchar(254) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    shortname varchar(15) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    summary text NOT NULL,&lt;br /&gt;
    format tinyint(4) NOT NULL default &#039;1&#039;,&lt;br /&gt;
    teacher varchar(100) NOT NULL default &#039;Teacher&#039;,&lt;br /&gt;
    startdate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    enddate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    timemodified int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    PRIMARY KEY (id)&lt;br /&gt;
 ) TYPE=MyISAM;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;SUCCESS&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and so on, followed by: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Main databases set up successfully.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see these, then there must have been some problem with the database or the configuration settings you defined in config.php. Check that PHP isn&#039;t in a restricted &amp;quot;Safe Mode&amp;quot; (commercial web hosts sometimes have safe mode turned on). You can check PHP variables by creating a little file containing &#039;&#039;&#039;&amp;lt;?php phpinfo() ?&amp;gt;&#039;&#039;&#039; and looking at it through a browser. Check all these and try this page again.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
You should now see a form where you can define more configuration variables for your installation, such as the default language, SMTP hosts and so on. Don&#039;t worry too much about getting everything right just now - you can always come back and edit these later on using the admin interface. The defaults are designed to be useful and secure for most sites. Scroll down to the bottom and click &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If (and only if) you find yourself getting stuck on this page, unable to continue, then your server probably has what I call the &amp;quot;buggy referrer&amp;quot; problem. This is easy to fix: just turn off the &amp;quot;secureforms&amp;quot; setting, then try to continue again.&lt;br /&gt;
&lt;br /&gt;
Next you will see more pages that print lots of status messages as they set up all the tables required by the various Moodle module. As before, they should all be &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;green&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
The next page is a form where you can define parameters for your Moodle site and the front page, such as the name, format, description and so on. Fill this out (you can always come back and change these later) and then press &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Finally, you will then be asked to create a top-level administration user for future access to the admin pages. Fill out the details with your own name, email etc and then click &amp;quot;Save changes&amp;quot;. Not all the fields are required, but if you miss any important fields you&#039;ll be re-prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you remember the username and password you chose for the administration user account, as they will be necessary to access the administration page in future.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(If for any reason your install is interrupted, or there is a system error of some kind that prevents you from logging in using the admin account, you can usually log in using the default username of &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;, with password &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
Once successful, you will be returned to the home page of your new site! Note the administration links that appear down the left hand side of the page (these items also appear on a separate Admin page) - these items are only visible to you because you are logged in as the admin user. All your further administration of Moodle can now be done using this menu, such as:&lt;br /&gt;
&lt;br /&gt;
* creating and deleting courses&lt;br /&gt;
* creating and editing user accounts&lt;br /&gt;
* administering teacher accounts&lt;br /&gt;
* changing site-wide settings like themes etc&lt;br /&gt;
&lt;br /&gt;
But you are not done installing yet! There is one very important thing still to do (see the next section on cron).&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Installing Moodle Using Command Line ==&lt;br /&gt;
{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
Installing Moodle Using command line is just as easy as installing Moodle using web browser. &lt;br /&gt;
* First Go to the moodle root directory and then to admin directory inside the moodle root. &lt;br /&gt;
&lt;br /&gt;
 $cd /var/www/html/moodle/admin&lt;br /&gt;
&lt;br /&gt;
* Then simply use the following syntax to run the moodle command line installer (this is a long command which has been split over 3 lines, so type as one line)&lt;br /&gt;
 $php cliupgrade.php --lang=en --webaddr=&amp;lt;nowiki&amp;gt;http://www.example.com&amp;lt;/nowiki&amp;gt; --moodledir=/var/www/html/moodle &lt;br /&gt;
                     --datadir=/var/moodledata --dbtype=mysql --dbhost=localhost --dbname=moodle &lt;br /&gt;
                     --dbuser=root --prefix=mdl --verbose=1 --interactivelevel=2 &lt;br /&gt;
&lt;br /&gt;
More information about the options can be found using &lt;br /&gt;
$php cliupgrad.php --help&lt;br /&gt;
&lt;br /&gt;
Then you will see the following list of available options&lt;br /&gt;
&lt;br /&gt;
 --lang		 		Valid installed language for installation. Default is English(en)&lt;br /&gt;
 --webaddr			Web address for the Moodle site&lt;br /&gt;
 --moodledir			Location of the moodle web folder&lt;br /&gt;
 --datadir			Location of the moodle data folder (should not be web visible)&lt;br /&gt;
 --dbtype			Database type. Default it mysql&lt;br /&gt;
 --dbhost			Database host. Default localhost&lt;br /&gt;
 --dbname			Database name. Default is moodle&lt;br /&gt;
 --dbuser			Database user. Default is blank&lt;br /&gt;
 --dbpass			Database password. Default is blank&lt;br /&gt;
 --prefix			        Table prefix for above database tables. Default is mdl&lt;br /&gt;
 --verbose			0 No output, 1 Summarized output(Default), 2 Detailed output&lt;br /&gt;
 --interactivelevel	        0 Non interactive, 1 Semi interactive(Default), 2 Interactive&lt;br /&gt;
 --help				print out this help&lt;br /&gt;
&lt;br /&gt;
When you choose non interactive mode without any options all the default values are assumed.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Set up cron ==&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s background tasks (e.g. sending out forum emails and performing course backups) are performed by a script which you can set to execute at specific times of the day. This is known as a cron script. Please refer to the [[Cron|Cron instructions]].&lt;br /&gt;
&lt;br /&gt;
== Set up backups ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[Backup settings| backup instructions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Create a new course ==&lt;br /&gt;
&lt;br /&gt;
Now that Moodle is running properly, you can try creating a new course to play with.&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Create a new course&amp;quot; from the Admin page (or the admin links on the home page).&lt;br /&gt;
&lt;br /&gt;
Fill out the form, paying special attention to the course format. You don&#039;t have to worry about the details too much at this stage, as everything can be changed later by the teacher. Note that the yellow help icons are everywhere to provide contextual help on any aspect.&lt;br /&gt;
&lt;br /&gt;
Press &amp;quot;Save changes&amp;quot;, and you will be taken to a new form where you can assign teachers to the course. You can only add existing user accounts from this form - if you want to create a new teacher account then either ask the teacher to create one for themselves (see the login page), or create one for them using the &amp;quot;Add a new user&amp;quot; on the Admin page.&lt;br /&gt;
&lt;br /&gt;
Once done, the course is ready to customize, and is accessible via the &amp;quot;Courses&amp;quot; link on the home page.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Installation FAQ]]&lt;br /&gt;
* [[Complete install packages]] might be an easier first time installs on some systems&lt;br /&gt;
* Help forum:  [http://moodle.org/mod/forum/view.php?id=28 Installation problems]&lt;br /&gt;
* [[Installing Apache, MySQL and PHP]] - Open source programs that can run Moodle on the web or on a desktop&lt;br /&gt;
* [[Upgrading Moodle]]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=42688 Selecting a web host for Moodle] forum discussion&lt;br /&gt;
* [[masquerading|Masquerading]] - Running Moodle behind a masquerading/NAT firewall&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[cs:Instalace]]&lt;br /&gt;
[[de:Installieren von Moodle]]&lt;br /&gt;
[[es:Instalación de moodle]]&lt;br /&gt;
[[fr:Installation de Moodle]]&lt;br /&gt;
[[ja:Moodleのインストール]]&lt;br /&gt;
[[nl:Installatiegids]]&lt;br /&gt;
[[pl:Instalacja Moodle]]&lt;br /&gt;
[[pt:Instalação do Moodle]]&lt;br /&gt;
[[ru:Установка Moodle]]&lt;br /&gt;
[[sk:Inštalácia]]&lt;br /&gt;
[[zh:安装Moodlezh:]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Filters&amp;diff=44372</id>
		<title>Talk:Filters</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Filters&amp;diff=44372"/>
		<updated>2008-09-25T15:42:21Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: New section: See also: video on enabling Moodle filters?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wondering about length of multi language, section.  Good information.  I thought it was a good idea to create a page &amp;quot;Multi language content&amp;quot; with these instructions, then link from from here to the new page, as was done under in other sections.  Decided to do it because this will also allow Jeff and Tim to break that page into sections. If I overstepped, I apologize and Helen can fix it.  --[[User:chris collman|chris collman]] 16:06, 26 August 2006 (CDT)&lt;br /&gt;
&lt;br /&gt;
Noticed somebody mentioned using a filter to solve a problem - happen to be Resource Linking.  Could not find a description in 1.5.3 filter (no help button) and MoodleDoc filter page did not have any reference to that and several other filters which are on my 1.5.3 version.  Went to 1.6  and took the basic idea from that help menu to create some words.--[[User:chris collman|chris collman]] 20:28, 10 August 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
== See also: video on enabling Moodle filters? ==&lt;br /&gt;
&lt;br /&gt;
I clicked on this link. It took me to a YouTube page that said it was a private video and it seems to be a trailer for a movie called Quarantine that is supposed to be in theaters next month (October &#039;08). What does that have to do with Moodle filters? --[[User:Richard Enison|Richard Enison]] 10:42, 25 September 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=43271</id>
		<title>Installing Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=43271"/>
		<updated>2008-09-09T00:09:48Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: inserted a space between words&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Firstly don&#039;t panic! :-)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This guide explains how to install Moodle for the first time. For some of these steps it goes into a lot of detail to try and cover the majority of possible web server setups, so this page may look long and complicated. Don&#039;t panic, once you know how to do it you can install Moodle in minutes!&lt;br /&gt;
&lt;br /&gt;
If you have problems please read this page carefully - most common issues are answered in here. If you still have trouble, you can seek help from the Moodle community via  [http://moodle.org/course/view.php?id=5 moodle.org Using Moodle].&lt;br /&gt;
&lt;br /&gt;
Another option is to contact a [http://moodle.com/hosting/ Moodle Partner providing Moodle hosting] who can completely maintain Moodle for you, so that you can ignore all this and get straight into educating! A Moodle partner is the preferred option but if you decide to choose a hosting company that has cpanel then [http://ic.eflclasses.org/tutorials/settingupmoodleonhostingwitholdcpanel.swf this tutorial will guide you]  through the process of choosing a host and setting up moodle via the old cpanel. If you have the new cpanel please use this link [http://ic.eflclasses.org/tutorials/settingupmoodleoncpanel.swf this tutorial will guide you].  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; some hosting companies offer one-click moodle install options such as fantastico, which whilst sometimes effective, usually use old (sometimes years old) versions of moodle and sometimes simply don&#039;t work. If one of these goes wrong, your best bet is often to start from scratch following the instructions here yourself. Its almost certainly quicker.&lt;br /&gt;
&lt;br /&gt;
If you want to run Moodle on your own computer and this page looks a bit daunting, then please see our guides on how to install one of Moodle&#039;s complete [[Complete install packages for Windows|Windows packages]], [[Complete Install Packages for Mac OS X|Mac OS packages]] or [[Installing AMP |Installing Apache, MySQL and PHP(AMP)]]. They provide alternative instructions to install all this on most popular platforms.&lt;br /&gt;
&lt;br /&gt;
==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
Moodle is primarily developed in Linux using [[Apache]], [[MySQL]] and [[PHP]] (also sometimes known as the LAMP platform), but is also regularly tested with Windows XP/2000/2003 (WAMP), Solaris 10 (Sparc and x64), Mac OS X and Netware 6 operating systems. Support for PostgreSQL, Oracle and Microsoft SQL Server is also available.&lt;br /&gt;
&lt;br /&gt;
The procedure for installing Moodle on the Windows platform (e.g. Windows Server, IIS and MSSQL) varies slightly to the procedure for the LAMP platform. See [[Installation for Windows 2003 with IIS]] for more details.&lt;br /&gt;
&lt;br /&gt;
[[Installing Moodle on Windows Vista]] might help with &#039;&#039;&#039;Blank page problem while installing Moodle on Windows Vista&#039;&#039;&#039; .&lt;br /&gt;
&lt;br /&gt;
The requirements for Moodle are as follows:&lt;br /&gt;
&lt;br /&gt;
===Hardware === &lt;br /&gt;
* Disk space: 160MB free (min). You will require more free space to store your teaching materials.&lt;br /&gt;
* Memory: 256MB (min), 1GB (recommended). The general rule of thumb is that Moodle can support 50 &#039;&#039;concurrent&#039;&#039; users for every 1GB of RAM, but this will vary depending on your specific hardware and software combination. &lt;br /&gt;
** &#039;&#039;&#039;Note if you are using a hosted account:&#039;&#039;&#039; Most hosted accounts on commercial sites will meet Disk and Memory requirements. However, you should contact your web host&#039;s support desk to check that this is the case before signing-up with them. It is especially important to &#039;&#039;&#039;ask about any PHP memory limits or MySQL question limits&#039;&#039;&#039;. If your prospective host does not provide a service which meets these requirements, or you are already signed up with them, ask them why and consider taking your business elsewhere if they do not change.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
* Web server software. Most people use [[Apache]], but Moodle should work fine under any web server that supports [[PHP]], such as [[IIS]] on Windows platforms. PHP does impose requirements on versions of web servers, however these are complex and the general advice is to use the newest version possible of your chosen web server. &lt;br /&gt;
* PHP scripting language. (Please note that there have been issues installing Moodle with [http://www.php-accelerator.co.uk PHP-Accelerator]). There are currently two versions (or branches) of PHP available: PHP4 and PHP5 and the version requirements are listed below.&lt;br /&gt;
** For Moodle version 1.4 or later: PHP4 (version 4.1.0 or later) or PHP5 (version 5.1.0 or later) are supported.&lt;br /&gt;
** For Moodle version 1.6 or later: the PHP4 (version 4.3.0 or later) or PHP5 (version 5.1.0 or later) are supported. &lt;br /&gt;
** Future Moodle versions 2.0 or later will not support PHP4 and will require PHP5 (version 5.2.4 or later).&lt;br /&gt;
** PHP Settings. Check these settings in your php.ini or .htaccess file (if you&#039;re using Apache). For settings which use ON/OFF as their values, you can substitute 1 for ON and 0 for OFF if you prefer. &lt;br /&gt;
*** &#039;&#039;safe_mode&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;memory_limit&#039;&#039; should be at least 16M (32M is recommended for Moodle 1.7 and 40M for Moodle 1.8 or later). Large sites may need more than 128M. PHP 5.2.x requires higher memory_limit values than previous versions of PHP. 64bit operating systems require even more memory.&lt;br /&gt;
*** &#039;&#039;session.save_handler&#039;&#039; needs to be set to FILES.&lt;br /&gt;
*** &#039;&#039;magic_quotes_gpc&#039;&#039; should be ON. (It will be recommended to turn it off in 2.0.)&lt;br /&gt;
*** &#039;&#039;magic_quotes_runtime&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;file_uploads&#039;&#039; needs to be ON.&lt;br /&gt;
*** &#039;&#039;session.auto_start&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;session.bug_compat_warn&#039;&#039; needs to be OFF.&lt;br /&gt;
** PHP Extensions and libraries&lt;br /&gt;
*** The mbstring extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** The iconv extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** [http://www.libgd.org/ GD library] and the [http://www.freetype.org/ FreeType 2] library and extensions are needed to be able to look at the dynamic graphs that the logs pages make.&lt;br /&gt;
*** The mysql extension is required if you are using the MySQL database. Note that in some Linux distributions (notably Red Hat) this is an optional installation.&lt;br /&gt;
*** The pgsql extension is required if you are using the PostgreSQL database.&lt;br /&gt;
*** The pdo and pdo_sqlite extensions are required for the (experimental) SQLite 3 database support.&lt;br /&gt;
*** The curl extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The tokenizer extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The curl and openssl extensions are required for the Moodle network functionality (Moodle 1.8 or later).&lt;br /&gt;
*** Other PHP extensions may be required to support optional Moodle functionality, especially external authentication and/or enrolment (e.g. LDAP extension for LDAP authentication and the sockets extension for Chat server).&lt;br /&gt;
* A working database server: [[MySQL]] or [[PostgreSQL]] are completely supported and recommended for use with any version of Moodle. Support for Microsoft SQL Server and Oracle has been added in Moodle 1.7. MySQL is &#039;&#039;the&#039;&#039; choice for many people because it is very popular, but there are some [[Arguments in favour of PostgreSQL|arguments in favour of PostgreSQL]], especially if you are planning a large deployment.&lt;br /&gt;
** For Moodle 1.5, MySQL (version 3.23 or later) or PostgreSQL (7.4 or later). &lt;br /&gt;
** For Moodle 1.6, MySQL (version 4.1.12 or later) or PostgreSQL (7.4 or later).&lt;br /&gt;
** For Moodle 1.7, MySQL (version 4.1.12 or later), PostgreSQL (7.4 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
** For Moodle 1.8 or later, MySQL (version 4.1.12 or later), PostgreSQL (8.0 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
: MySQL Notes: For Moodle 1.6 or later, If you use latin languages only you can use MySQL 4.1.12. If you are using non-latin languages you require MySQL 4.1.16 or later. Currently the MySQL setting &amp;quot;strict mode&amp;quot; must be OFF (set to &amp;quot;&amp;quot; or &amp;quot;MYSQL40&amp;quot;) in the MySQL configuration file. &lt;br /&gt;
: PostgreSQL Notes: PostgreSQL 7.4 is recommended for earlier Moodle versions, since Moodle 1.8 only PostgreSQL 8.0 and above are supported.&lt;br /&gt;
* For showcases or low to medium-sized installations, Moodle 2.0 also includes (experimental) support for SQLite 3 database. This setup requires no database server, as the database file is stored in a local directory on the server.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== How many users? ==&lt;br /&gt;
&lt;br /&gt;
In addition to the hardware and software requirements, you will also need to think about the capacity of your Moodle installation in terms of the number of users it can handle. There are two numbers to plan for:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Browsing users&#039;&#039;&#039;: the maximum number of users able to browse your Moodle site. This is the number of computers in your organization or on your course (whichever is greater).&lt;br /&gt;
:&#039;&#039;&#039;Concurrent database users&#039;&#039;&#039;: the maximum number of concurrent database users (needed for Moodle activities such as quizzes). This is the number of users who will be using Moodle at the same time. In an educational institution, use your timetable/roster to obtain this figure.&lt;br /&gt;
&lt;br /&gt;
Once you know these figures for your users, you can start work out if your Moodle installation can support this capacity. The exact number of users depends on your hardware/software/network combination. Usually the amount of memory installed (RAM) is the deciding factor but a faster overall processor speed will also help in reducing waiting times for pages to load. &lt;br /&gt;
&lt;br /&gt;
The general rule of thumb for a single server is that the approx max concurrent users = RAM (GB) * 50 and the approx max browsing users = Approx max concurrent users * 5. As an example, a university with 500 total computers on campus and 100 concurrent users at any time will need approx 2GB of RAM on the one server to support the number of concurrent users.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note if you are using a hosted account&#039;&#039;&#039;: Ask your provider what limits are placed on the number of concurrent database connections and the processor load. This will give a good estimate of the number of users your Moodle install can manage.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note:&#039;&#039;&#039; As of August 31, 2007, Moodle 1.8.2+ is not recommended for large installations, especially if you have large number (e.g. 20,000+) of courses. The main reason is the codes related to ROLES are still not fully optimized with database queries and still need some work. If you are planning to use 1.8.x codes for a larger institution, please make sure that you have sufficient time to do your own testing and performance profiling.  Upgrade to Moodle 1.9!!&lt;br /&gt;
&lt;br /&gt;
[Update|Updating from a previous version] of Moodle has been improved quite a bit from 1.8.3+ version (see this thread discussion: http://moodle.org/mod/forum/discuss.php?d=83281).  Moodle 1.9 has even more improvements in all areas and is the recommended version.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Download and copy files into place ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to get Moodle, either as a compressed package or via [[CVS]]. &lt;br /&gt;
&lt;br /&gt;
=== Download from compressed packages===&lt;br /&gt;
There are two types of compressed packages at the [http://download.moodle.org/ download.moodle.org page:] which offer a variety of version, operating systems and compression types.&lt;br /&gt;
#The &amp;quot;Standard Distribution&amp;quot; (with Moodle only files) and &lt;br /&gt;
#Several operating system &amp;quot;Complete Install Packages&amp;quot; (which contains programs to create a Moodle in a web environment). Please see [[Complete install packages]] for more information.  &lt;br /&gt;
&lt;br /&gt;
Most of these instructions are for the standard distribution, &lt;br /&gt;
Download a compressed package and then unpack the archive into your file structure using either of these two commands:&lt;br /&gt;
 tar -zxvf [filename]&lt;br /&gt;
 unzip [filename]&lt;br /&gt;
&lt;br /&gt;
===Download from CVS===&lt;br /&gt;
To use CVS, helpful instructions are available at the [[CVS_for_Administrators | CVS for Administrators]] page. The full [http://cvs.moodle.org/moodle/ Moodle CVS repository] is also available for browsing. &lt;br /&gt;
&lt;br /&gt;
If you are using CVS, run the CVS Checkout command.&lt;br /&gt;
&lt;br /&gt;
===Directory created placement===&lt;br /&gt;
After either of the above processes, you will now have with a directory called &amp;quot;moodle&amp;quot;, containing a number of files and folders.&lt;br /&gt;
&lt;br /&gt;
For the standard package, you can either place the whole folder in your web server documents directory, in which case the site will be located at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com/moodle&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;, or you can copy all the contents straight into the main web server documents directory, in which case the site will be simply &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip&#039;&#039;&#039;: If you are downloading Moodle to your local computer and then uploading it to your web site, it is usually better to upload the whole archive as one file, and then do the unpacking on the server. Even web hosting interfaces like cPanel allow you to uncompress archives in the &amp;quot;File Manager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Structure of moodle directory ===&lt;br /&gt;
&lt;br /&gt;
You can safely skip this section, but here is a quick summary of the contents of the Moodle folder, to help get you oriented:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;config.php&#039;&#039; - contains basic settings. This file does not come with Moodle - you will create it by executing install.php or manually.&lt;br /&gt;
:&#039;&#039;install.php&#039;&#039; - the script you will run to create config.php&lt;br /&gt;
:&#039;&#039;version.php&#039;&#039; - defines the current version of Moodle code&lt;br /&gt;
:&#039;&#039;index.php&#039;&#039; - the front page of the site&lt;br /&gt;
:&#039;&#039;admin/&#039;&#039; - code to administrate the whole server&lt;br /&gt;
:&#039;&#039;auth/&#039;&#039; - plugin modules to authenticate users&lt;br /&gt;
:&#039;&#039;blocks/&#039;&#039; - plugin modules for the little side blocks on many pages&lt;br /&gt;
:&#039;&#039;calendar/&#039;&#039; - all the code for managing and displaying calendars&lt;br /&gt;
:&#039;&#039;course/&#039;&#039; - code to display and manage courses&lt;br /&gt;
:&#039;&#039;doc/&#039;&#039; - help documentation for Moodle (eg this page)&lt;br /&gt;
:&#039;&#039;files/&#039;&#039; - code to display and manage uploaded files&lt;br /&gt;
:&#039;&#039;lang/&#039;&#039; - texts in different languages, one directory per language&lt;br /&gt;
:&#039;&#039;lib/&#039;&#039; - libraries of core Moodle code&lt;br /&gt;
:&#039;&#039;login/&#039;&#039; - code to handle login and account creation&lt;br /&gt;
:&#039;&#039;mod/&#039;&#039; - all the main Moodle course modules are in here&lt;br /&gt;
:&#039;&#039;pix/&#039;&#039; - generic site graphics&lt;br /&gt;
:&#039;&#039;theme/&#039;&#039; - theme packs/skins to change the look of the site.&lt;br /&gt;
:&#039;&#039;user/&#039;&#039; - code to display and manage users&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Setting-up your system==&lt;br /&gt;
To ensure that Moodle will install successfully, you need to check that the web server settings are correct, then create a blank database for Moodle to use and finally create a directory on your hard disk for Moodle to save your materials and other files you upload into your courses.&lt;br /&gt;
&lt;br /&gt;
=== Check web server settings ===&lt;br /&gt;
&lt;br /&gt;
*Firstly, make sure that your web server is set up to use index.php as a default page (perhaps in addition to index.html, default.htm and so on). In Apache, this is done using a DirectoryIndex parameter in your httpd.conf file. Mine usually looks like this:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;DirectoryIndex&#039;&#039;&#039; index.php index.html index.htm&lt;br /&gt;
&lt;br /&gt;
:Just make sure index.php is in the list (and preferably towards the start of the list, for efficiency).&lt;br /&gt;
&lt;br /&gt;
*Secondly, &#039;&#039;&#039;if you are using Apache 2&#039;&#039;&#039;, then you should turn on the &#039;&#039;AcceptPathInfo&#039;&#039; variable, which allows scripts to be passed arguments like &amp;lt;nowiki&amp;gt;http://server/file.php/arg1/arg2&amp;lt;/nowiki&amp;gt;. This is essential to allow relative links between your resources, and also provides a performance boost for people using your Moodle web site. You can turn this on by adding these lines to your httpd.conf file. (NB: This setting, or any equivalent, is not required in Apache 1)&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
=== Recheck PHP settings ===&lt;br /&gt;
Moodle requires a number of PHP settings to be active for it to work. These were given in the Requirements section and &#039;&#039;&#039;On most servers these will already be the default settings&#039;&#039;&#039;.  However, some PHP servers (and some of the more recent PHP versions) may have things set differently, so it is useful to double-check that the settings are correct. These are defined in PHP&#039;s configuration file (usually called &#039;&#039;&#039;php.ini&#039;&#039;&#039;) or in the Apache &#039;&#039;&#039;.htaccess&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
 safe_mode = 0 (necessary)&lt;br /&gt;
 memory_limit = 40M (varies: minimum 16M, 32M Moodle v1.7, 40M Moodle v1.8, 128M large sites)&lt;br /&gt;
 session.save_handler = files (unless you are using another handler, e.g. mm)   &lt;br /&gt;
 magic_quotes_gpc = 1    (preferred but not necessary, 0 will be recommended in 2.0)&lt;br /&gt;
 magic_quotes_runtime = 0    (necessary)&lt;br /&gt;
 file_uploads = 1&lt;br /&gt;
 session.auto_start = 0&lt;br /&gt;
 session.bug_compat_warn = 0&lt;br /&gt;
&lt;br /&gt;
You may also want to set other, optional php.ini file settings while you are already editing it. For instance, you may want to reset the maximum upload size of file attachments, which usually defaults to 2M(egabytes). For instance, to set these to 16 Megabytes:&lt;br /&gt;
 &lt;br /&gt;
 post_max_size = 16M&lt;br /&gt;
 upload_max_filesize = 16M&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Using a .htaccess file for webserver and PHP settings ===&lt;br /&gt;
&lt;br /&gt;
Use the above if you can directly edit your server&#039;s files, but if you are setting-up Moodle on a webhost, or don&#039;t have access to &#039;&#039;&#039;httpd.conf&#039;&#039;&#039; or &#039;&#039;&#039;php.ini&#039;&#039;&#039; on your server, or you have Moodle on a server with other applications that require different settings, then don&#039;t worry, you can often still override the default settings. This only works on Apache servers and only when Overrides have been allowed in the main Apache configuration. Moodle is supplied with a htaccess file which you can use, or you can create your own file manually.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Use the default htaccess file&#039;&#039;&#039;. The easiest thing to do is just copy the sample file from moodle/lib/htaccess and edit it to suit your needs. It contains further instructions. For example, in a Unix shell:&lt;br /&gt;
&lt;br /&gt;
 cd moodle&lt;br /&gt;
 cp moodle/lib/htaccess .htaccess&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Create your own file&#039;&#039;&#039;. Alternatively you can create your own file called &#039;&#039;&#039;.htaccess&#039;&#039;&#039; in Moodle&#039;s main directory that contains lines like the following. &lt;br /&gt;
&lt;br /&gt;
 DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 php_value memory_limit 40M (adjust to your version of Moodle)&lt;br /&gt;
 php_flag magic_quotes_gpc 1&lt;br /&gt;
 php_flag magic_quotes_runtime 0&lt;br /&gt;
 php_flag file_uploads 1&lt;br /&gt;
 php_flag session.auto_start 0&lt;br /&gt;
 php_flag session.bug_compat_warn 0&lt;br /&gt;
&lt;br /&gt;
:If you have Apache version 2 installed, add these lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;IfDefine APACHE2&amp;gt;&lt;br /&gt;
     AcceptPathInfo on&lt;br /&gt;
 &amp;lt;/IfDefine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Otherwise add this single line:&lt;br /&gt;
&lt;br /&gt;
 AcceptPathInfo on&lt;br /&gt;
&lt;br /&gt;
:Optionally, you can also do things like define the maximum size for uploaded files, etc by adding these lines:&lt;br /&gt;
&lt;br /&gt;
 LimitRequestBody 0&lt;br /&gt;
 php_value upload_max_filesize 2M&lt;br /&gt;
 php_value post_max_size 2M&lt;br /&gt;
&lt;br /&gt;
:The value given in these lines is 2M. You may want to change this at a later date to allow uploading of larger files.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Some shared hosts do not allow .htaccess files&#039;&#039;&#039;. In this case, it may be necessary to place a php.ini file within each sub-directory of the site. To do this, you use your editor to create a php.ini file in the main moodle directory and later copy it to all sub-directories. The syntax for the php.ini file is different than the one used in .htaccess - you do not use the php_value and php_flag prefixes. See the example below:&lt;br /&gt;
 upload_max_filesize = 2M&lt;br /&gt;
 post_max_size = 2M&lt;br /&gt;
:After creating the php.ini file with all of the statements you need, run the script http://tips-scripts.com/php_ini_copy or copy php.ini manually to all sub-directories.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Some shared hosts use suPHP, which requires a slightly different configuration&#039;&#039;&#039;. If everything else fails, try creating the following two files and uploading to your moodle root directory&lt;br /&gt;
:php.ini (sample):&lt;br /&gt;
 register_globals = 0&lt;br /&gt;
 display_errors = 0&lt;br /&gt;
&lt;br /&gt;
:.htaccess (sample):&lt;br /&gt;
 suPHP_ConfigPath /home/cPanelName/public_html/moodle&lt;br /&gt;
&lt;br /&gt;
Change the above path to the actual path to your moodle install.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note&#039;&#039;&#039;: Use a .htaccess file only [http://httpd.apache.org/docs/1.3/howto/htaccess.html#when as a last resort] as it can have an impact on the performance of your Moodle site and cause pages to load slowly on your browser.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating an empty database ===&lt;br /&gt;
&lt;br /&gt;
You need to create an empty database (eg &amp;quot;&#039;&#039;moodle&#039;&#039;&amp;quot;) in your database system along with a special user (eg &amp;quot;moodleuser&amp;quot;) that has access to that database (and that database only). You could use the &amp;quot;root&amp;quot; user if you wanted to for a test server, but this is not recommended for a production system: if hackers manage to discover the password then your whole database system would be at risk, rather than just one database.&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;Warning&#039;&#039;&#039;: Bear in mind that, as of Moodle version 1.5.x, Moodle doesn&#039;t work with MySQL 5.x&#039;s strict mode setting (STRICT_TRANS_TABLES and/or STRICT_ALL_TABLES) -- see [http://moodle.org/mod/forum/discuss.php?d=58552 forum discussion]. So if you are using MySQL 5.x, edit MySQL&#039;s configuration file (called &amp;quot;my.ini&amp;quot; in Windows and &amp;quot;my.cnf&amp;quot; on Unix/Linux) and comment out that option or set it to &amp;lt;code&amp;gt;sql-mode=&#039;&#039;&amp;lt;/code&amp;gt;. You have to restart MySQL after changing this setting. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; If you do not have access to your server, use PHPMyAdmin (or another MySQL client) and enter the command &amp;lt;code&amp;gt;SET @@global.sql_mode=&#039;&#039;;&amp;lt;/code&amp;gt; (be sure to use single quotes, and don&#039;t forget the semicolon).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
====Using a hosted server====&lt;br /&gt;
If you are using a webhost, they will probably have a control panel web interface for you to create your database.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;[http://www.cpanel.com/ cPanel]&#039;&#039;&#039; system is one of the most popular of these. &lt;br /&gt;
To create a database using cPanel:&lt;br /&gt;
&lt;br /&gt;
# Click on the &#039;&#039;&#039;MySQL Databases&#039;&#039;&#039; icon.&lt;br /&gt;
# Type &#039;&#039;&#039;moodle&#039;&#039;&#039; in the New Database field and click &#039;&#039;&#039;Create Database&#039;&#039;&#039;.&lt;br /&gt;
# Type a &#039;&#039;username&#039;&#039; and &#039;&#039;password&#039;&#039; (not one you use elsewhere) in the respective fields and click &#039;&#039;&#039;Create  User&#039;&#039;&#039;.&amp;lt;br&amp;gt;Note that the &#039;&#039;username&#039;&#039; and &#039;&#039;database&#039;&#039; names may be prefixed by your cPanel account name and an underscore, and truncated to 16 characters. When entering this information into the Moodle installer - use the full names.&lt;br /&gt;
# Now use the &#039;&#039;&#039;Add Users to Databases&#039;&#039;&#039; button and give this new user account &#039;&#039;&#039;ALL&#039;&#039;&#039; rights to the new database.&lt;br /&gt;
&lt;br /&gt;
Continue with [[Installing_Moodle#CreatDataDir |Creating the data directory]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
====Using a SQLite database====&lt;br /&gt;
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.&lt;br /&gt;
&lt;br /&gt;
Moodle 2.0 offers support for SQLite3 database installations. In this case, no database setup is required. The database file will be created by the installation script. By default, the database file will be store in Moodle&#039;s data directory (see [[Installing_Moodle#CreatDataDir |Creating the data directory]]). During install, the web server must have write access on the directory where the database file will be stored. After installation, the web server must have read-write access to the database file.&lt;br /&gt;
&lt;br /&gt;
Continue with [[Installing_Moodle#CreatDataDir |Creating the data directory]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Using the command line====&lt;br /&gt;
&lt;br /&gt;
If you have access to Unix or Windows command lines then you can do the same sort of thing by typing commands. You should do this using the MySQL Client program as follows (commands which you type-in are shown in bold):&lt;br /&gt;
&lt;br /&gt;
- Start the MySQL Client program:&lt;br /&gt;
 #&#039;&#039;&#039;mysql -u root -p&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 2 to server version: 5.0.22-log&lt;br /&gt;
 &lt;br /&gt;
 Type &#039;help;&#039; or &#039;\h&#039; for help. Type &#039;\c&#039; to clear the buffer.&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- The prompt changes to &amp;quot;mysql&amp;gt;&amp;quot; to indicate that you are now working in the MySQL Client program. When working in MySQL, all commands which you type-in must end in a semi-colon. (If you hit the Enter key without the final semi-colon, you&#039;ll get the line continuation symbol &#039;-&amp;gt;&#039;; this is your second chance to type the semi-colon and hit Enter.) &lt;br /&gt;
&lt;br /&gt;
- Begin by checking for any existing databases called &amp;quot;moodle&amp;quot; - if there are any you should change the name in all the commands which follow:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;SHOW DATABASES;&#039;&#039;&#039;&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | Database                |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | information_schema      |&lt;br /&gt;
 | mysql                   |&lt;br /&gt;
 | test                    |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 3 rows in set (0.03 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a database to store the Moodle tables. We&#039;ll call this &amp;quot;moodle&amp;quot;, as there are none with that name already in the above list, but change it if you need to.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;CREATE DATABASE moodle;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Change the default character set and collation of the &amp;quot;moodle&amp;quot; database to UTF8. Leave this out if you are installing Moodle 1.5 or earlier):&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a username and password to access the database &amp;quot;moodle&amp;quot; and grant database access permissions. We&#039;ll call the user &amp;quot;moodleuser&amp;quot; and set the password as &amp;quot;yourpassword&amp;quot;. It&#039;s a good idea to change these for your installation however most people keep the username as &amp;quot;moodleuser&amp;quot;. Remember the username and password you have set, as you&#039;ll need it in the configuration screens later. This is a long command so has been split over several lines by pressing the Return key.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;DROP,INDEX,ALTER ON moodle.*&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;TO moodleuser@localhost IDENTIFIED BY &#039;yourpassword&#039;;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Security Warnings&#039;&#039;&#039;: Never leave the password as the one shown here. Make sure you have a strong password (a mixture of letters and numbers, upper and lower case). Avoid granting &amp;quot;ALL&amp;quot; permissions on the database.&lt;br /&gt;
: &#039;&#039;&#039;Note&#039;&#039;&#039;: For MySQL 4.0.1 or earlier, you don&#039;t need the CREATE TEMPORARY TABLES permission. &lt;br /&gt;
&lt;br /&gt;
- Exit the MySQL Client program:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;QUIT&#039;&#039;&#039;&lt;br /&gt;
 Bye&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
- Reload the grant tables using the mysqladmin program:&lt;br /&gt;
 #&#039;&#039;&#039;mysqladmin -u root -p reload&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
And some example command lines for PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
   # su - postgres&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create user moodleuser createdb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create database moodle &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;with encoding &#039;unicode&#039;&amp;lt;/font&amp;gt;;&amp;quot; -U moodleuser template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser nocreatedb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser with encrypted password &#039;yourpassword&#039;;&amp;quot; template1&lt;br /&gt;
   &amp;gt; su - root&lt;br /&gt;
   # /etc/init.d/postgresql reload&lt;br /&gt;
&lt;br /&gt;
If the Postgres create database command above (&amp;gt;psql -c &amp;quot;create database moodle...&amp;quot;) gives an error message you may want to try:&lt;br /&gt;
 psql -c &amp;quot;create database moodle with template=template1 encoding = &#039;unicode&#039; owner =  moodleuser &amp;lt;br&amp;gt;     location = &#039;/var/mydata&#039;;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If the create database command asks you for a password, run the line containing &#039;encrypted password&#039; first before proceeding.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
* Step-by-step instructions on  [https://docs.moodle.org/en/Step-by-step_Install_Guide_for_Ubuntu installation for Ubuntu(Debian)]&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the data directory  ===&lt;br /&gt;
&lt;br /&gt;
Moodle will also need some space on your server&#039;s hard disk to store uploaded files, such as course documents and user pictures. The Moodle installer tries hard to create the &#039;&#039;&#039;moodledata&#039;&#039;&#039; directory for you but if it fails then you will have to create a directory for this purpose manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Security warning&#039;&#039;&#039;: For security purposes, it is &#039;&#039;&#039;CRITICAL&#039;&#039;&#039; that this directory is &#039;&#039;&#039;NOT&#039;&#039;&#039; accessible directly via the web. The easiest way to do this is to simply locate it OUTSIDE the web site root directory (it is the folder that the main part of your URL -that is, the part up to the first single / - points to; for example, in &amp;lt;nowiki&amp;gt;http://your.domain.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;, it is &amp;lt;nowiki&amp;gt;http://your.domain.com/&amp;lt;/nowiki&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
But if you must have it in the web directory (and you are using Apache AND the web server configuration allows .htaccess files to restrict access to directories) then protect it by creating a file in the data directory called &#039;&#039;&#039;.htaccess&#039;&#039;&#039;, containing these lines:&lt;br /&gt;
&lt;br /&gt;
 order deny,allow&lt;br /&gt;
 deny from all&lt;br /&gt;
&lt;br /&gt;
If you are using IIS, you need to edit the properties of the data directory (from the Internet Information Services Manager console) and deny access to that folder to everybody from the web.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you don&#039;t protect the data directory from direct web access, anybody will be able to impersonate any user of your Moodle site (including the admin user!!!), and all of your course materials will be available to the web at large.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ownership &amp;amp; Permissions&#039;&#039;&#039;: To make sure that Moodle can save uploaded files in this directory, check that the web server software has permission to read, write and execute in this directory. On Unix machines, this means setting the owner of the directory to be something like &amp;quot;nobody&amp;quot; or &amp;quot;apache&amp;quot;, and then giving that user read, write and execute permissions. As an example, to change the owner to &amp;quot;nobody&amp;quot; you could use:&lt;br /&gt;
&lt;br /&gt;
 chown -R nobody:apache moodledata&lt;br /&gt;
&lt;br /&gt;
To change the permissions so that the owner has read,write and execute permissions, use something like this:&lt;br /&gt;
&lt;br /&gt;
 chmod -R 0770 moodledata&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: If you are receiving permission denied messages, try &#039;&#039;chmod -R 0770 moodledata&#039;&#039; and then adjust the settings so that they are more secure. A more secure setting is &#039;&#039;chmod -R 0750 moodledata&#039;&#039;. According to the comments in config-dist.php, &amp;quot;On hosting systems you might need to make sure that your group has no permissions at all while others have full permissions.&amp;quot; To do this you could use &#039;&#039;chmod -R 707 moodledata&#039;&#039;. See also the [[Security | security page]].&lt;br /&gt;
&lt;br /&gt;
Remember that by default moodle will issue a warning about moodle data directories created inside the web directory, but otherwise this directory can be located where you wish. You can later move or change the location of this directory, but if you do, be sure to edit the setting in the &#039;&#039;&#039;config.php&#039;&#039;&#039; file that sets this; e.g. if moodledata is under a directory called data, then it would look like this:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/data/moodledata&#039;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CPanel and webhosts&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
On cPanel systems you can use the &amp;quot;File Manager&amp;quot; to find the folder, click on it, then choose &amp;quot;Change Permissions&amp;quot;. On many shared hosting servers, you will probably need to restrict all file access to your &amp;quot;group&amp;quot; (to prevent other webhost customers from looking at or changing your files), but provide full read/write access to everyone else (which will allow the web server to access your files). Speak to your server administrator if you are having trouble setting this up securely. In particular it will not be possible to create a usable data directory on sites that use a PHP feature known as &amp;quot;&#039;&#039;&#039;Safe Mode&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Run the installer script to create config.php ==&lt;br /&gt;
&lt;br /&gt;
To run the installer script (install.php), just try to access your Moodle main URL using a web browser, or access &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourserver/install.php&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039; directly.&lt;br /&gt;
&lt;br /&gt;
(The Installer will try to set a session cookie. If you get a popup warning in your browser make sure you accept that cookie!)&lt;br /&gt;
&lt;br /&gt;
Moodle will detect that configuration is necessary and will lead you through some screens to help you create a new configuration file called &#039;&#039;&#039;config.php&#039;&#039;&#039;. At the end of the process Moodle will try and write the file into the right location, otherwise you can press a button to download it from the installer and then upload &#039;&#039;&#039;config.php&#039;&#039;&#039; into the main Moodle directory on the server.&lt;br /&gt;
&lt;br /&gt;
Along the way the installer will test your server environment and give you suggestions about how to fix any problems. For most common issues these suggestions should be sufficient, but if you get stuck, check in the Installation Forum for more help.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Go to the admin page to continue configuration ==&lt;br /&gt;
&lt;br /&gt;
Once the basic config.php has been correctly created in the previous step, trying to access the front page of your site will take you to the &amp;quot;admin&amp;quot; page for the rest of the configuration.&lt;br /&gt;
&lt;br /&gt;
The first time you access this admin page, you will be presented with a GPL &amp;quot;shrink wrap&amp;quot; agreement with which you must agree before you can continue with the setup.&lt;br /&gt;
&lt;br /&gt;
Now Moodle will start setting up your database and creating tables to store data. Firstly, the main database tables are created. You should see a number of SQL statements followed by status messages that look like this:&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE course (&lt;br /&gt;
    id int(10) unsigned NOT NULL auto_increment,&lt;br /&gt;
    category int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    password varchar(50) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    fullname varchar(254) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    shortname varchar(15) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    summary text NOT NULL,&lt;br /&gt;
    format tinyint(4) NOT NULL default &#039;1&#039;,&lt;br /&gt;
    teacher varchar(100) NOT NULL default &#039;Teacher&#039;,&lt;br /&gt;
    startdate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    enddate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    timemodified int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    PRIMARY KEY (id)&lt;br /&gt;
 ) TYPE=MyISAM;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;SUCCESS&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and so on, followed by: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Main databases set up successfully.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see these, then there must have been some problem with the database or the configuration settings you defined in config.php. Check that PHP isn&#039;t in a restricted &amp;quot;Safe Mode&amp;quot; (commercial web hosts sometimes have safe mode turned on). You can check PHP variables by creating a little file containing &#039;&#039;&#039;&amp;lt;?php phpinfo() ?&amp;gt;&#039;&#039;&#039; and looking at it through a browser. Check all these and try this page again.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
You should now see a form where you can define more configuration variables for your installation, such as the default language, SMTP hosts and so on. Don&#039;t worry too much about getting everything right just now - you can always come back and edit these later on using the admin interface. The defaults are designed to be useful and secure for most sites. Scroll down to the bottom and click &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If (and only if) you find yourself getting stuck on this page, unable to continue, then your server probably has what I call the &amp;quot;buggy referrer&amp;quot; problem. This is easy to fix: just turn off the &amp;quot;secureforms&amp;quot; setting, then try to continue again.&lt;br /&gt;
&lt;br /&gt;
Next you will see more pages that print lots of status messages as they set up all the tables required by the various Moodle module. As before, they should all be &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;green&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
The next page is a form where you can define parameters for your Moodle site and the front page, such as the name, format, description and so on. Fill this out (you can always come back and change these later) and then press &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Finally, you will then be asked to create a top-level administration user for future access to the admin pages. Fill out the details with your own name, email etc and then click &amp;quot;Save changes&amp;quot;. Not all the fields are required, but if you miss any important fields you&#039;ll be re-prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you remember the username and password you chose for the administration user account, as they will be necessary to access the administration page in future.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(If for any reason your install is interrupted, or there is a system error of some kind that prevents you from logging in using the admin account, you can usually log in using the default username of &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;, with password &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
Once successful, you will be returned to the home page of your new site! Note the administration links that appear down the left hand side of the page (these items also appear on a separate Admin page) - these items are only visible to you because you are logged in as the admin user. All your further administration of Moodle can now be done using this menu, such as:&lt;br /&gt;
&lt;br /&gt;
* creating and deleting courses&lt;br /&gt;
* creating and editing user accounts&lt;br /&gt;
* administering teacher accounts&lt;br /&gt;
* changing site-wide settings like themes etc&lt;br /&gt;
&lt;br /&gt;
But you are not done installing yet! There is one very important thing still to do (see the next section on cron).&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Installing Moodle Using Command Line ==&lt;br /&gt;
{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
Installing Moodle Using command line is just as easy as installing Moodle using web browser. &lt;br /&gt;
* First Go to the moodle root directory and then to admin directory inside the moodle root. &lt;br /&gt;
&lt;br /&gt;
 $cd /var/www/html/moodle/admin&lt;br /&gt;
&lt;br /&gt;
* Then simply use the following syntax to run the moodle command line installer (this is a long command which has been split over 3 lines, so type as one line)&lt;br /&gt;
 $php cliupgrade.php --lang=en --webaddr=&amp;lt;nowiki&amp;gt;http://www.example.com&amp;lt;/nowiki&amp;gt; --moodledir=/var/www/html/moodle &lt;br /&gt;
                     --datadir=/var/moodledata --dbtype=mysql --dbhost=localhost --dbname=moodle &lt;br /&gt;
                     --dbuser=root --prefix=mdl --verbose=1 --interactivelevel=2 &lt;br /&gt;
&lt;br /&gt;
More information about the options can be found using &lt;br /&gt;
$php cliupgrad.php --help&lt;br /&gt;
&lt;br /&gt;
Then you will see the following list of available options&lt;br /&gt;
&lt;br /&gt;
 --lang		 		Valid installed language for installation. Default is English(en)&lt;br /&gt;
 --webaddr			Web address for the Moodle site&lt;br /&gt;
 --moodledir			Location of the moodle web folder&lt;br /&gt;
 --datadir			Location of the moodle data folder (should not be web visible)&lt;br /&gt;
 --dbtype			Database type. Default it mysql&lt;br /&gt;
 --dbhost			Database host. Default localhost&lt;br /&gt;
 --dbname			Database name. Default is moodle&lt;br /&gt;
 --dbuser			Database user. Default is blank&lt;br /&gt;
 --dbpass			Database password. Default is blank&lt;br /&gt;
 --prefix			        Table prefix for above database tables. Default is mdl&lt;br /&gt;
 --verbose			0 No output, 1 Summarized output(Default), 2 Detailed output&lt;br /&gt;
 --interactivelevel	        0 Non interactive, 1 Semi interactive(Default), 2 Interactive&lt;br /&gt;
 --help				print out this help&lt;br /&gt;
&lt;br /&gt;
When you choose non interactive mode without any options all the default values are assumed.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Set up cron ==&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s background tasks (e.g. sending out forum emails and performing course backups) are performed by a script which you can set to execute at specific times of the day. This is known as a cron script. Please refer to the [[Cron|Cron instructions]].&lt;br /&gt;
&lt;br /&gt;
== Set up backups ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[Backup settings| backup instructions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Create a new course ==&lt;br /&gt;
&lt;br /&gt;
Now that Moodle is running properly, you can try creating a new course to play with.&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Create a new course&amp;quot; from the Admin page (or the admin links on the home page).&lt;br /&gt;
&lt;br /&gt;
Fill out the form, paying special attention to the course format. You don&#039;t have to worry about the details too much at this stage, as everything can be changed later by the teacher. Note that the yellow help icons are everywhere to provide contextual help on any aspect.&lt;br /&gt;
&lt;br /&gt;
Press &amp;quot;Save changes&amp;quot;, and you will be taken to a new form where you can assign teachers to the course. You can only add existing user accounts from this form - if you want to create a new teacher account then either ask the teacher to create one for themselves (see the login page), or create one for them using the &amp;quot;Add a new user&amp;quot; on the Admin page.&lt;br /&gt;
&lt;br /&gt;
Once done, the course is ready to customize, and is accessible via the &amp;quot;Courses&amp;quot; link on the home page.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Installation FAQ]]&lt;br /&gt;
* [[Complete install packages]] might be an easier first time installs on some systems&lt;br /&gt;
* Help forum:  [http://moodle.org/mod/forum/view.php?id=28 Installation problems]&lt;br /&gt;
* [[Installing Apache, MySQL and PHP]] - Open source programs that can run Moodle on the web or on a desktop&lt;br /&gt;
* [[Upgrading Moodle]]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=42688 Selecting a web host for Moodle] forum discussion&lt;br /&gt;
* [[masquerading|Masquerading]] - Running Moodle behind a masquerading/NAT firewall&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[cs:Instalace]]&lt;br /&gt;
[[de:Installieren von Moodle]]&lt;br /&gt;
[[es:Instalación de moodle]]&lt;br /&gt;
[[fr:Installation de Moodle]]&lt;br /&gt;
[[ja:Moodleのインストール]]&lt;br /&gt;
[[nl:Installatiegids]]&lt;br /&gt;
[[pl:Instalacja Moodle]]&lt;br /&gt;
[[pt:Instalação do Moodle]]&lt;br /&gt;
[[ru:Установка Moodle]]&lt;br /&gt;
[[sk:Inštalácia]]&lt;br /&gt;
[[zh:安装Moodlezh:]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=43057</id>
		<title>Installation FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=43057"/>
		<updated>2008-09-02T20:59:53Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* I receive this error &amp;quot;500:Internal Server Error&amp;quot; */ correct grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==PHP - is it installed and what version do I have?==&lt;br /&gt;
&lt;br /&gt;
Make a new file on your web site called &#039;&#039;info.php&#039;&#039;, containing the following text, and call it from your browser:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?PHP phpinfo() ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If nothing happens then you don&#039;t have PHP installed or your webserver is not configured to handle .php files properly. See the installation docs for some information about where to download it for your computer. See the [[phpinfo]] page for details about the content of this page.&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== System information needed for Installation Forum ==&lt;br /&gt;
When posting questions to the installation forum, try to provide as much background information as possible about your moodle system. Use this template to copy and paste into your post:&lt;br /&gt;
* Server Operating System name (version also if possible): &lt;br /&gt;
* Browser name (version also if possible):&lt;br /&gt;
* Moodle version:&lt;br /&gt;
* Moodle install type? (New/Upgrade):&lt;br /&gt;
* Moodle config.php attached?(Y/N):&lt;br /&gt;
* Phpinfo attached? (Y/N):&lt;br /&gt;
&lt;br /&gt;
For the last two items, try to include the following in your post as an attachment:&lt;br /&gt;
* A copy of your phpinfo output as shown in your browser (see the instructions above for an explanation of how to obtain this).&lt;br /&gt;
* A copy of the Moodle configuration file. This is located in the directory moodle and is named config.php&lt;br /&gt;
&lt;br /&gt;
Copy and paste both of these into a single text file (using vi, Notepad, etc) and attach this to your post.&lt;br /&gt;
&lt;br /&gt;
If you cannot provide your phpinfo, try to copy &amp;amp; paste and complete these in your post:&lt;br /&gt;
* Webserver (e.g. Apache/IIS) version:&lt;br /&gt;
* Database server (e.g. MySQL, PostgreSQL) version:&lt;br /&gt;
* PHP version:&lt;br /&gt;
&lt;br /&gt;
For installation on web hosting accounts: contact your support desk who should be able to tell you this information.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Security Warning&#039;&#039;&#039;: Make sure you edit any files and delete any passwords before posting onto the forum.&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==What &amp;amp; where are Moodle&#039;s configuration settings stored?==&lt;br /&gt;
Configuration settings are stored in the config.php file stored in your moodle folder. This file is created during the installation process. If there is a problem and the installation cannot create the file, you can try creating it manually from the [[Configuration file]] docs. Please remember that manually editing the file is not recommended and may lead to blank pages, especially if there are additional spaces and/or lines after the final php closing tag &amp;quot;?&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Running a health check==&lt;br /&gt;
Moodle contains a script that will help identify common php and webserver configuration problems as well as configuration problems. It is a good idea to run this script to check if you are having post-installation problems. Use your browser to run this file:&lt;br /&gt;
&lt;br /&gt;
 http://www.mymoodle.com/moodle/admin/health.php&lt;br /&gt;
&lt;br /&gt;
Change the above line if you have installed moodle in the webroot instead of a folder inside the webroot.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Downloading previous releases of Moodle==&lt;br /&gt;
* &#039;&#039;&#039;Generic Packages&#039;&#039;&#039;: If your server does not meet the [[Installing_Moodle#Requirements | requirements]] for the current version of Moodle, you can download previous releases by using wget, lynx or curl with this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
:For example: to download Moodle version 1.5, use http://download.moodle.org/stable15. You&#039;ll see a directory tree with the files displayed. Click on the one you want and download as normal - if you require the latest update of the version, scroll to the end of the list and download the &amp;quot;moodle-latest&amp;quot; file, or alternatively use these URLs for zip or tgz downloads:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].tgz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Changes made in the version in the last month are listed in the &amp;quot;CHANGES&amp;quot; file in the directory listing. The files you download contain Moodle code and are not the Windows or Mac packages - so you need to have a webserver, a database server and PHP already installed. The earliest version available is Moodle 1.3.&lt;br /&gt;
* &#039;&#039;&#039;Windows Packages&#039;&#039;&#039;: To download previous releases of the Moodle packages for Windows, use this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/windows/MoodleWindowsInstaller-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Mac Packages&#039;&#039;&#039;: To download previous releases of the Mac pacakges, use either of these URLs (depending on whether you need the Intel or PPC package):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-Intel-[version_number].dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-PPC-[version_number}.dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Using CVS&#039;&#039;&#039;: You can also use CVS to download older releases and incremental releases of the Moodle generic packages, e.g. Moodle 1.5.4 - see the [[CVS_for_Administrators | CVS documentation]].&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
== How to enable and check PHP error logs==&lt;br /&gt;
PHP can be set up to log errors in a variety of different ways: two of these involve the use of the php.ini file and the ini_set command. &lt;br /&gt;
* &#039;&#039;&#039;Using the php.ini file&#039;&#039;&#039;: The log settings are contained in the php.ini file stored on the server. If you don&#039;t know where that is, edit your Moodle &#039;&#039;config.php&#039;&#039; and add the following as the second line&lt;br /&gt;
&lt;br /&gt;
  phpinfo();&lt;br /&gt;
&lt;br /&gt;
:then reload the web page. Look for the entry &#039;&#039;&#039;Configuration File (php.ini) Path&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:When you have located php.ini open it in your favorite text editor. Find the &#039;&#039;&#039;Error handling and logging&#039;&#039;&#039; section of the php.ini file. Make sure that both &#039;&#039;&#039;display_errors = On&#039;&#039;&#039;, &#039;&#039;&#039;display_startup_errors = On&#039;&#039;&#039; and &#039;&#039;&#039;log_errors = On&#039;&#039;&#039; are present and uncommented. Check the value of &#039;&#039;&#039;error_log&#039;&#039;&#039; - 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).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Using ini_set commands&#039;&#039;&#039;: If you are using Moodle 1.7 or higher, the previous steps are not enough. In those versions error logging parameters are dependant on certain administrative settings that you specify in the debugging section. The problem is that if you can&#039;t access the administrative pages, you can&#039;t set the debugging options. So the only way to modify them is by adding the following lines to your config.php file, just before the last line (the one containing a single&#039;?&amp;gt;&#039; only):&lt;br /&gt;
&lt;br /&gt;
  ini_set (&#039;display_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;log_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;display_startup_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;error_reporting&#039;, E_ALL);&lt;br /&gt;
  $CFG-&amp;gt;debug = DEBUG_ALL;&lt;br /&gt;
&lt;br /&gt;
:This will enable the same settings specified above even if Moodle sets them otherwise. &lt;br /&gt;
:&#039;&#039;&#039;Important&#039;&#039;&#039;: Remember to put them just before the last line of config.php.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Any text I add with an apostrophe (&#039;) or a quote (&amp;quot;) causes errors or comes up with a slash added==&lt;br /&gt;
&lt;br /&gt;
Problems caused by apostrophes are caused by incorrect &amp;quot;magic quotes&amp;quot; settings. Moodle requires the following settings in the php.ini file (which are usually the default):&lt;br /&gt;
&lt;br /&gt;
 magic_quotes_runtime = Off&lt;br /&gt;
&lt;br /&gt;
Starting in 2.0 it is strongly recommended to disable magic quotes completely&lt;br /&gt;
&lt;br /&gt;
  magic_quotes_gpc = Off&lt;br /&gt;
&lt;br /&gt;
Please see [[Installing Moodle]] for more details.&lt;br /&gt;
&lt;br /&gt;
If you are using [[Debian_GNU/Linux_installation|Debian]] then the problem might be in the version of PHP that you have installed. Have a look at this [http://tracker.moodle.org/browse/MDL-9691 bug report ]  to see if it matches your situation.&lt;br /&gt;
&lt;br /&gt;
==Email copies are not being sent from my forums==&lt;br /&gt;
&lt;br /&gt;
You &#039;&#039;must&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
Basically, you need to set up a process to regularly call the script &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://yoursite/admin/cron.php&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Please refer to the [[Cron|cron instructions]].&lt;br /&gt;
&lt;br /&gt;
Tips:&lt;br /&gt;
* Try the default settings in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039;. This generally works.&lt;br /&gt;
*Make sure that &#039;&#039;allowuseremailcharset&#039;&#039; in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039; is set to No. Setting this to Yes can cause a problem in some versions of Moodle.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Error: database connection failed==&lt;br /&gt;
&lt;br /&gt;
If you get errors like &amp;quot;database connection failed&amp;quot; or &amp;quot;could not connect to the database you specified&amp;quot;, here are some possible reasons and some possible solutions.&lt;br /&gt;
&lt;br /&gt;
* Your &#039;&#039;&#039;database server&#039;&#039;&#039; isn&#039;t installed or running. To check this for MySQL try typing the following command line&lt;br /&gt;
 $telnet database_host_name 3306&lt;br /&gt;
:You should get a cryptic response which includes the version number of the MySQL server. &lt;br /&gt;
* If you are attempting to run &#039;&#039;&#039;two instances of Moodle on different ports&#039;&#039;&#039;, use the ip address of the host (not localhost) in the $CFG-&amp;gt;dbhost setting, e.g. $CFG-&amp;gt;dbhost = 127.0.0.1:3308.&lt;br /&gt;
* You don&#039;t have the &#039;&#039;&#039;PHP mysql or postgresql extensions&#039;&#039;&#039; installed (please refer to FAQ re. whether PHP is installed).&lt;br /&gt;
* You haven&#039;t created a &#039;&#039;&#039;Moodle database and assigned a user&#039;&#039;&#039; with the correct privileges to access it. &lt;br /&gt;
* The &#039;&#039;&#039;Moodle database settings&#039;&#039;&#039; are incorrect. The database name, database user or database user password in your Moodle configuration file &#039;&#039;config.php&#039;&#039; are incorrect. Use phpMyAdmin to set up and check your MySQL installation.&lt;br /&gt;
* Check that there are &#039;&#039;&#039;no apostrophes or non-alphabetic letters&#039;&#039;&#039; in your MySQL username or password.&lt;br /&gt;
* You are using MySQL version 4.1 or higher but the PHP MySQL extension is pre-4.1 (check in your phpinfo output). In this case the &#039;&#039;&#039;default password hashing algorithm&#039;&#039;&#039; is incompatible with that available in the PHP mysql extension versions 4.x.x. Use these MySQL commands to change the passwords to the old format:&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt;SET PASSWORD FOR &#039;root&#039;@&#039;localhost&#039; = OLD_PASSWORD(&#039;password&#039;);&lt;br /&gt;
 mysql&amp;gt;SET PASSWORD FOR &#039;moodleuser&#039;@&#039;localhost&#039; = OLD_PASSWORD(&#039;password&#039;);&lt;br /&gt;
&lt;br /&gt;
:Also, consider upgrading your PHP MySQL extension. See [http://dev.mysql.com/doc/mysql/en/old-client.html this MySQL document] for further information on how to deal with this problem.&lt;br /&gt;
* You are using Fedora core 3 or some other Linux system with &#039;&#039;&#039;SELinux installed&#039;&#039;&#039; and enabled. See the following URL for information on how to disable SELinux: http://fedora.redhat.com/projects/selinux/ If you don&#039;t want to disable SELinux, you have to allow httpd process to create network connections:&lt;br /&gt;
&lt;br /&gt;
 setsebool httpd_can_network_connect true&lt;br /&gt;
 &lt;br /&gt;
* Mac OSX users -- if you are running MySQL on a Mac OSX, try changing &#039;&#039;&#039;$CFG-&amp;gt;dbhost&#039;&#039;&#039; from &#039;localhost&#039; to &#039;127.0.0.1&#039;&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: MySQL page on [http://dev.mysql.com/doc/refman/5.0/en/common-errors.html common errors] which lists several possible scenarios for connection failure, with advice on how to fix the problems.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I can&#039;t log in - I just stay stuck on the login screen==&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;src=bar_sch_nam Norton firewall products].&lt;br /&gt;
&lt;br /&gt;
The server admin can also fix this for everyone by changing the &#039;&#039;secureforms&#039;&#039; variable to &#039;No&#039; in the security section of Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]].&lt;br /&gt;
&lt;br /&gt;
Another possible cause of this problem is that sessions are not configured properly on the server. You can test this by calling the script &amp;lt;nowiki&amp;gt;http://yourserver/moodle/lib/session-test.php&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are still having problems, read the [[Can_not_log_in | Cannot log in]] page.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I can&#039;t log in with message &amp;quot;Please verify that the current setting of session.save_path is correct&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
This error occurs when PHP is having problems saving its session files. You may also see these other error messages displayed on the screen or in your log files:&lt;br /&gt;
&lt;br /&gt;
 Warning: Unknown: open(some-path/sessions/sess_acbf942a7399db3489ffa910e35d5242, O_RDWR)&lt;br /&gt;
 failed: Permission denied (13) in Unknown on line 0&lt;br /&gt;
&lt;br /&gt;
 Warning: Unknown(): open(some-path/sessions/sess_acbf942a7399db3489ffa910e35d5242, O_RDWR) &lt;br /&gt;
 failed: No space left on device (28) in Unknown on line 0&lt;br /&gt;
&lt;br /&gt;
 Warning: Unknown: Failed to write session data (files). Please verify that the current &lt;br /&gt;
 setting of session.save_path is correct (some-path/sessions) in Unknown on line 0 &lt;br /&gt;
&lt;br /&gt;
To temporarily bypass these errors, &#039;&#039;&#039;use database sessions&#039;&#039;&#039; by editing your [[Configuration_file | moodle configuration file]] and adding this line:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dbsessions = true;&lt;br /&gt;
&lt;br /&gt;
Database sessions may overload your mysql database and are not ideal in a shared hosting environment, so if this solves the problem, you can start fixing the problem as follows:&lt;br /&gt;
* Check &#039;&#039;&#039;access rights&#039;&#039;&#039;. The session.save_path should be accessible by the apache user. Try this command:&lt;br /&gt;
&lt;br /&gt;
 chown -R apache:apache some-path/sessions&lt;br /&gt;
&lt;br /&gt;
:This assumes that &#039;apache&#039; is the name of the user your webserver runs under - it could also be &#039;nobody&#039;.&lt;br /&gt;
* Check the &#039;&#039;&#039;permissions&#039;&#039;&#039; to the directory that PHP is trying to save to (session.save_path = some-path/sessions). Set the permissions initially to 0777 (everyone read, write, execute) with this command:&lt;br /&gt;
&lt;br /&gt;
 chmod -R 0777 some-path/sessions&lt;br /&gt;
&lt;br /&gt;
:If this fixes the problem, reduce the permissions (700 is recommended).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Session problems can be specific to your server environment. As an example, see [http://moodle.org/mod/forum/discuss.php?d=55925#254596 this forum discussion] about session problems with Lycos hosting.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I log in but the login link doesn&#039;t change. I am logged in and can navigate freely.==&lt;br /&gt;
&lt;br /&gt;
Make sure the URL in your &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; setting is exactly the same as the one you are actually using to access the site.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I keep getting this error: A server error that affects your login session was detected.==&lt;br /&gt;
&lt;br /&gt;
Please refer to the Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=73716 A server error that affects your login session was detected. Please login again or restart your browser.].&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I keep getting this error: Failed opening required &#039;/web/moodle/lib/setup.php&#039;==&lt;br /&gt;
&lt;br /&gt;
In your &#039;&#039;config.php&#039;&#039;, the setting that you use for the dirroot variable must be the complete path from the root of your server&#039;s hard drive.&lt;br /&gt;
&lt;br /&gt;
Sometimes people only use the path from their home directory, or relative to the root of the web server directory.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==My pages show fatal errors such as : Parse error, call to undefined function: get_string()==&lt;br /&gt;
&lt;br /&gt;
If you see errors like:&lt;br /&gt;
&lt;br /&gt;
 Parse error: parse error, unexpected T_VARIABLE in /path/to/moodle/config.php on line 94 &lt;br /&gt;
 Fatal error: Call to undefined function: get_string() in /path/to/moodle/mod/resource/lib.php&lt;br /&gt;
 on line 11&lt;br /&gt;
&lt;br /&gt;
then you have probably left out a semi-colon or closing quote from a line in &#039;&#039;config.php&#039;&#039; (previous to line 94).&lt;br /&gt;
&lt;br /&gt;
Another possibility is that you edited &#039;&#039;config.php&#039;&#039; in a program like Word and saved it as a HTML web page, instead of using a plain text editor like Notepad.&lt;br /&gt;
&lt;br /&gt;
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 (&amp;lt;? ?&amp;gt;) instead of proper ones (&amp;lt;?php ?&amp;gt;). 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:&lt;br /&gt;
&lt;br /&gt;
 short_open_tag = On&lt;br /&gt;
&lt;br /&gt;
You should never find short tags in core moodle code. If you do, please file a bug in the bug tracker.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Serious Error! Could not set up the site!==&lt;br /&gt;
&lt;br /&gt;
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!].&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Uploaded files give &amp;quot;File not found&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
For example: Not Found: The requested URL /moodle/file.php/2/myfile.jpg was not found on this server.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;httpd.conf&#039;&#039;, or to a &#039;&#039;.htaccess&#039;&#039; file in your local directory (see [[Installing Moodle]] for more details):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
Note, this will ONLY work for Apache versions 2.x.&lt;br /&gt;
&lt;br /&gt;
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&#039;t be able to use relative links within HTML resources.&lt;br /&gt;
&lt;br /&gt;
To use this alternative method, you should change the &#039;&#039;slasharguments&#039;&#039; variable. For moodle versions &amp;lt; 1.7, this is located in the Operating System section of &#039;&#039;Administration &amp;gt; Configuration &amp;gt; [[admin/config|Variables]]&#039;&#039;. In later versions, this option is located in &#039;&#039;Site Administration &amp;gt; Server &amp;gt; HTTP&#039;&#039;. You should now be able to access your uploaded files.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==When I go to the admin page, I get told to make dirroot blank!==&lt;br /&gt;
&lt;br /&gt;
If you see errors like this:&lt;br /&gt;
&lt;br /&gt;
 Please fix your settings in config.php: &lt;br /&gt;
 You have: $CFG-&amp;gt;dirroot = &amp;quot;/home/users/fred/public_html/moodle&amp;quot;; &lt;br /&gt;
 but it should be: $CFG-&amp;gt;dirroot = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;admin/index.php&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 if ($dirroot != $CFG-&amp;gt;dirroot) {&lt;br /&gt;
&lt;br /&gt;
and change it to this:&lt;br /&gt;
&lt;br /&gt;
 if (!empty($dirroot) and $dirroot != $CFG-&amp;gt;dirroot) {&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==When trying to add a resource I receive error messages==&lt;br /&gt;
&lt;br /&gt;
Assuming you are using Apache, then it&#039;s quite likely that your setting in &#039;&#039;config.php&#039;&#039; for &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; is different from the actual URL you are using to access the site. Also try turning off the &#039;&#039;secureforms&#039;&#039; variable in the security section of Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]].&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Why are all my pages blank?==&lt;br /&gt;
&lt;br /&gt;
Check the dirroot variable in &#039;&#039;config.php&#039;&#039;. You must use complete, absolute pathnames e.g.&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dirroot = &amp;quot;d:\inetpub\sites\www.yoursite.com\web\moodle&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
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 see [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | How to enable and check PHP error logs]].&lt;br /&gt;
&lt;br /&gt;
To determine if MySQL support is your problem, insert this as the second line in your &#039;&#039;config.php&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
 phpinfo();&lt;br /&gt;
&lt;br /&gt;
then reload the web page. Examine the output closely to see if MySQL is supported. If not look for a package you are missing.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Why is a particular page blank or incomplete? ==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your web server log files!!&#039;&#039;&#039; &lt;br /&gt;
:If a particular page is blank or incomplete (it doesn&#039;t display the footer), before you do anything else [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | check your error logs]]. Having established that PHP error 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.&lt;br /&gt;
&lt;br /&gt;
*If you are &#039;&#039;&#039;upgrading to a new version of Moodle&#039;&#039;&#039;, check that you do not have an old version of a non-standard block or module installed. Remove any such blocks or modules installed using the admin settings page and start the install process again. However, do also make sure that you have included all optional plugins that were required by your courses. &lt;br /&gt;
&lt;br /&gt;
*If you &#039;&#039;&#039;do not see any blocks listed&#039;&#039;&#039;, turn editing on and remove any blocks that you have added to that page and try reloading.&lt;br /&gt;
&lt;br /&gt;
*You may get this error immediately after &#039;&#039;&#039;selecting a language&#039;&#039;&#039;. At this stage of the installation process your Moodle computer may need to connect to the Internet and download a language pack, so check that the computer can access the Internet by using a browser. Check also that your PHP settings are as given in the Moodle [[Installing_Moodle#Requirements | Moodle Requirements]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=97734 PHP configuration error] forum discussion  &lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Installation hangs when setting-up database tables==&lt;br /&gt;
Sometimes the installation will hang when setting up tables. This will be an abrupt hang with half the page displayed in the browser and/or other outputs removed. Examples are:&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Truncated mysql statements&#039;&#039;&#039;:&lt;br /&gt;
 &lt;br /&gt;
 (mysql): SET NAMES &#039;utf8&#039;&lt;br /&gt;
 --------------------------------------------------------------------------------&lt;br /&gt;
 (mysql): SHOW LOCAL VARIABLES LIKE &#039;character_set_database&#039;&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 (no more statements are displayed)   &lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Missing Continue button&#039;&#039;&#039;: The “Scroll to continue” link is displayed but no “Continue” button is there. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: There is an exception to this when upgrading an existing database and the installation may appear to hang at the roles generation phase. This process can take a very long time - so please be patient.&lt;br /&gt;
&lt;br /&gt;
Below are some solutions you can try to overcome this problem:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check for mysql limits&#039;&#039;&#039;. This is often a mysql error and not a php error. Check that there is no limit placed on your mysql database, e.g. a &amp;quot;questions&amp;quot; limit.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your .htaccess files&#039;&#039;&#039;. If the install is on a webhost, adding the following line to the .htaccess file in the moodle directory has been known to solve the problem.&lt;br /&gt;
 AddType x-mapp-php5 .php&lt;br /&gt;
&lt;br /&gt;
:Try also renaming the .htaccess file so that it is disabled.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Code customizations&#039;&#039;&#039;. You may also want to look and see if you&#039;ve customized any of your code.  Look at the last successful table, and then look at the block, mod, or other code that is referenced by that table.  For example, if your install hangs and continues to say that the forum tables were successful as the last message, look at /mod/forum/ for any custom code.  If you have customized code, backup those files and replace with the correct files.  You can then restart the install by renaming config.php or reinstalling your database from the backup.  If your install is successful, you can make your code changes back into the stock Moodle code.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your memory limit&#039;&#039;&#039;. It may also be that the &amp;quot;memory_limit&amp;quot; in your php.ini is set too low. Please check your php.ini file and allocate the recommended amount (see [https://docs.moodle.org/en/Installing_Moodle#Requirements Moodle requirements]). For Moodle version 1.8 and above at least 40MB is  recommended.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Upgrade incrementally&#039;&#039;&#039;. To avoid this problem when upgrading, it is recommended to upgrade via each version of Moodle, for example 1.7 -&amp;gt; 1.8 -&amp;gt; 1.9 (with the exception of upgrading from 1.5 or 1.6, when it is recommended that 1.7 is skipped, in other words upgrade 1.5 -&amp;gt; 1.6 -&amp;gt; 1.8 -&amp;gt; 1.9).&lt;br /&gt;
&lt;br /&gt;
A work-around to this problem is to setup a working Moodle system on your local PC or server using the [http://download.moodle.org Moodle Packages]. Once you have a running Moodle, [https://docs.moodle.org/en/Upgrading_Moodle#Backup_important_data backup the database] and import to your webhost. Then backup the Moodle code itself (the &amp;quot;moodle&amp;quot; directory on your PC) and copy this to your webhost using (for example) FTP. Finally, edit the moodle/config.php file for the new settings that have to be changed for the webhost.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Why can&#039;t I upload a new image into my profile?==&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see anything on your user profile pages to let you upload user images then it&#039;s usually because GD is not enabled on your server. GD is a library that allows image processing.&lt;br /&gt;
&lt;br /&gt;
1. Make sure &#039;&#039;&#039;GD has been included in your PHP installation&#039;&#039;&#039;. You can check this by going into Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[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.&lt;br /&gt;
&lt;br /&gt;
2. If Moodle thinks GD is not installed, then you will need to &#039;&#039;&#039;install the GD library&#039;&#039;&#039;. &lt;br /&gt;
*On Unix you may need to re-compile PHP with arguments something like this:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-gd &lt;br /&gt;
 --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-ttf --enable-gd-native-ttf &lt;br /&gt;
 --enable-magic-quotes --with-mysql --enable-sockets --enable-track-vars &lt;br /&gt;
 --enable-versioning --with-zlib&lt;br /&gt;
&lt;br /&gt;
* On Windows this is usually a matter of &amp;quot;turning on&amp;quot; the extension in PHP by editing your php.ini file. To do this remove the semicolon for the php_gd2.dll extension - check that this file is actually present in your php extensions  folder first (search your php.ini for extension_dir to determine where this points to on your hard disk). You should then have a line that looks like this:&lt;br /&gt;
 extension=php_gd2.dll&lt;br /&gt;
&lt;br /&gt;
:Windows users should see the [[Installing AMP|installation instructions]] for further help. &lt;br /&gt;
&lt;br /&gt;
3. Remember to &#039;&#039;&#039;restart your webserver&#039;&#039;&#039; (if possible) and re-visit the Moodle configuration page after making any changes to PHP so it can pick up the correct version of GD.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=44271 Profile pictures] for additional information.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Why do I keep getting error messages about &amp;quot;headers already sent&amp;quot;?==&lt;br /&gt;
&lt;br /&gt;
If you see errors like this:&lt;br /&gt;
&lt;br /&gt;
 Warning: Cannot add header information - headers already sent by &lt;br /&gt;
 (output started at /webs/moodle/config.php:87) in /webs/moodle/lib/moodlelib.php &lt;br /&gt;
 on line 1322 &lt;br /&gt;
&lt;br /&gt;
 Warning: Cannot add header information - headers already sent by &lt;br /&gt;
 (output started at /webs/moodle/config.php:87) in /webs/moodle/lib/moodlelib.php &lt;br /&gt;
 on line 1323 &lt;br /&gt;
&lt;br /&gt;
 Warning: Cannot add header information - headers already sent by &lt;br /&gt;
 (output started at /webs/moodle/config.php:87) in /webs/moodle/login/index.php &lt;br /&gt;
 on line 54&lt;br /&gt;
&lt;br /&gt;
you have blank lines or spaces after the final &amp;lt;code&amp;gt;?&amp;gt;&amp;lt;/code&amp;gt; in your &#039;&#039;config.php&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
== Why doesn&#039;t my Moodle site display the time and date correctly? ==&lt;br /&gt;
&lt;br /&gt;
Each language requires a specific language code (called a &#039;&#039;&#039;locale&#039;&#039;&#039; code) to allow dates to be displayed correctly. The language packs contain default standard codes, but sometimes these don&#039;t work on Windows servers.&lt;br /&gt;
&lt;br /&gt;
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. &amp;quot;esp_esp&amp;quot; for spanish)&lt;br /&gt;
&lt;br /&gt;
These new locale codes can be entered on the Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]] page, where they override the ones in the currently chosen language pack.&lt;br /&gt;
&lt;br /&gt;
==I receive this error &amp;quot;500:Internal Server Error&amp;quot;==&lt;br /&gt;
There are several possible causes for this error:&lt;br /&gt;
&lt;br /&gt;
1. &#039;&#039;&#039;Syntax error&#039;&#039;&#039;: There is a syntax error in your .htaccess or httpd.conf files. The way in which directives are written [http://httpd.apache.org/docs/1.3/howto/htaccess.html#when differs] depending on which file you are using. You can test for configuration errors in your Apache files using the command:&lt;br /&gt;
 #apachectl configtest&lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;&#039;PHPsuexec&#039;&#039;&#039;: Your server does not support .htaccess files, especially if it is running PHPsuexec, which is an Apache module used for increasing the security of a site on a hosted system. In this situation:&lt;br /&gt;
&lt;br /&gt;
- you may also see a 403: Forbidden error.&lt;br /&gt;
&lt;br /&gt;
- the webserver executes under your own username and all files have a maximum permissions level of 755. Check that this is set for your Moodle directory in your control panel or (if you have access to the shell) use this command:&lt;br /&gt;
 #chmod -R 755 moodle&lt;br /&gt;
&lt;br /&gt;
- use a PHP.INI file instead of a .htaccess in the directory where the Moodle PHP script is being executed. For example: if you are receiving a memory exhausted error when your server is executing the file moodle/admin/cron.php, use a PHP.INI file to change your memory_limit and copy it to the moodle/admin directory. Remember that for PHP4, PHP.INI files are per-directory, so you&#039;ll need to copy it to each sub-directory. If you are using PHP5 or higher on a shared host, check with your host on whether they support custom PHP.INI files, and how to create them. The syntax used in a PHP.INI file is different from a .htaccess file and you need to take out php_value/php_flag at the beginning of the line and use an equals sign to assign a value, e.g.&lt;br /&gt;
 php_value memory_limit 128M &amp;lt;-- .htaccess&lt;br /&gt;
 memory_limit = 128M         &amp;lt;-- php.ini equivalent &lt;br /&gt;
&lt;br /&gt;
3. &#039;&#039;&#039;Incompatible directive&#039;&#039;&#039;: You may have a directive in your .htaccess or httpd.conf files which are not compatible with your web server version. Check your webserver documentation.&lt;br /&gt;
&lt;br /&gt;
==I receive this error &amp;quot;403: Forbidden&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Check your webserver configuration. See also the section above I receive this error &amp;quot;500:Internal Server Error&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==How do I uninstall Moodle?==&lt;br /&gt;
&#039;&#039;&#039;Moodle package installation&#039;&#039;&#039;: If you have downloaded a Moodle package, simply uninstall using your system commands. On Windows PCs, you should access the Control Panel -&amp;gt; Add/Remove Programs. Select the package name and click Change or Remove Programs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Webhost/manual installation&#039;&#039;&#039;: If you have installed Moodle manually or have installed onto a webhost, follow these steps:&lt;br /&gt;
*Delete the moodle database using this mysql command (or delete using your mysql client, e.g. PHPMyAdmin):&lt;br /&gt;
&amp;lt;pre&amp;gt;sql&amp;gt;DROP DATABASE moodle;&amp;lt;/pre&amp;gt;&lt;br /&gt;
:In the above example replace &#039;moodle&#039; with the name of the moodle database you created when installing.&lt;br /&gt;
*Delete the moodledata directory. If you, or your users, have uploaded materials into this directory take a copy of these before deleting this directory.&lt;br /&gt;
*Delete the moodle directory itself. This will delete all of the moodle PHP script files.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==How do I upgrade Moodle? Do I just overwrite the files?==&lt;br /&gt;
Do not overwrite files, it may cause strange errors. You should read the [[Upgrade]] documentation before proceeding.&lt;br /&gt;
&lt;br /&gt;
==Migrating Moodle to a new site or server==&lt;br /&gt;
Migrating Moodle means that you have to move the current installation to a new server, and so may have to change IP addresses or DNS entries. To do this you will need to change the $CFG-&amp;gt;wwwroot value in the config.php on the new server. You will also have to change any absolute links stored in the database backup file (before restoring the file on the new server) either using the admin/replace.php script, your text editor or another &amp;quot;search and replace&amp;quot; tool, e.g. sed. For more details see the [[Moodle_migration | Moodle Migration]] page.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Fatal error allowed memory size exhausted. How do I increase my php memory limit?==&lt;br /&gt;
You will sometimes see an error message something like this:&lt;br /&gt;
 Fatal error: Allowed memory size of 67108864 bytes exhausted &lt;br /&gt;
 (tried to allocate xx bytes) in /var/www/moodle/yyyy.php&lt;br /&gt;
This error means that the php memory_limit value is not enough for the php script. The memory_limit value is the &amp;quot;allowed memory size&amp;quot; - 64M in the example above (67108864 bytes / 1024 = 65536 KB. 65536 KB / 1024 = 64 MB). You will need to increase the php memory_limit value until this message is not shown anymore. There are two methods of doing this.&lt;br /&gt;
*On a hosted installation, add the following line to your .htaccess file (or create one in the moodle directory if it does not already exist):&lt;br /&gt;
 php_value memory_limit &amp;lt;value&amp;gt;M&lt;br /&gt;
 Example: php_value memory_limit 40M&lt;br /&gt;
*If you have your own server with shell access, edit your php.ini file (make sure it&#039;s the correct one by checking in your phpinfo output) as follows:&lt;br /&gt;
 memory_limit &amp;lt;value&amp;gt;M&lt;br /&gt;
 Example: memory_limit 40M&lt;br /&gt;
Remember that you need to restart your web server to make changes to php.ini effective. An alternative is to disable the memory_limit by using the command &#039;&#039;memory_limit 0&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Why does my new installation display correctly on the server, but when I view it from a different machine, styles and images are missing?==&lt;br /&gt;
In the installation instructions, one of the suggested settings for &#039;webroot&#039; is &#039;localhost&#039;. This is fine if all you want to do is some local testing of your new Moodle installation. If, however, you want to view your new installation from another machine on the same local area network, or view your site on the internet, you will have to change this setting:&lt;br /&gt;
*For local testing, &#039;localhost&#039; is fine for the webroot ($CFG-&amp;gt;wwwroot in config.php). &lt;br /&gt;
*If you want to test your site from other machines on the same local area network (LAN), then you will have to use the private ip address of the serving machine, (e.g. 192.168.1.2/moodle) or the network name of the serving computer (e.g. network_name_of_serving_machine/moodle) as the web root. Depending on your LAN setup, it may be better to use the network name of the computer rather than its (private) ip address, because the ip address can and will change from time to time. If you don&#039;t want to use the network name, then you will have to speak to your network administrator and have them assign a permanent ip address to the serving machine.&lt;br /&gt;
*Finally, if you want to test your new installation across the internet, you will have to use either a domain name or a permanent (public) ip address/moodle as your web root. To handle both types of access, see [https://docs.moodle.org/en/masquerading masquerading].&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Maximum upload file size - how to change it?==&lt;br /&gt;
There are several places to change the maximum file upload size. The first place to check is the Administration block.   Security -&amp;gt; Site Policies -&amp;gt; and look for &amp;quot;Maximum Uploaded File Size&amp;quot;.  This is the &amp;quot;maxbyte&amp;quot; variable found in older versions of Moodle (under Admin &amp;gt; Variables). Teachers may also set the maximum file size by the [[Course_settings#Maximum_upload_size|course administration block]].&lt;br /&gt;
&lt;br /&gt;
The second place to check are the server files.  The php.ini file has a limit which will override any other setting. (Hint: remember to restart your server for changes to take effect).  For more help see:&lt;br /&gt;
*[[Administration_FAQ#How_do_the_limits_on_uploaded_files_work.3F]]&lt;br /&gt;
*[[Installing_Moodle#Recheck_PHP_settings]]&lt;br /&gt;
*[[Installing_Moodle#Using_a_.htaccess_file_for_webserver_and_PHP_settings]]&lt;br /&gt;
*[[Site_policies#Maximum_uploaded_file_size]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:FAQ Instalación]]&lt;br /&gt;
[[fr:FAQ d&#039;installation]]&lt;br /&gt;
[[nl:Installatie FAQ]]&lt;br /&gt;
[[ja:インストールFAQ]]&lt;br /&gt;
[[ru:Установка FAQ]]&lt;br /&gt;
[[pl:Instalacja FAQ]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=43056</id>
		<title>Installation FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=43056"/>
		<updated>2008-09-02T20:54:16Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* I receive this error &amp;quot;500:Internal Server Error&amp;quot; */  correct egregious misstatement about php.ini&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==PHP - is it installed and what version do I have?==&lt;br /&gt;
&lt;br /&gt;
Make a new file on your web site called &#039;&#039;info.php&#039;&#039;, containing the following text, and call it from your browser:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?PHP phpinfo() ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If nothing happens then you don&#039;t have PHP installed or your webserver is not configured to handle .php files properly. See the installation docs for some information about where to download it for your computer. See the [[phpinfo]] page for details about the content of this page.&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== System information needed for Installation Forum ==&lt;br /&gt;
When posting questions to the installation forum, try to provide as much background information as possible about your moodle system. Use this template to copy and paste into your post:&lt;br /&gt;
* Server Operating System name (version also if possible): &lt;br /&gt;
* Browser name (version also if possible):&lt;br /&gt;
* Moodle version:&lt;br /&gt;
* Moodle install type? (New/Upgrade):&lt;br /&gt;
* Moodle config.php attached?(Y/N):&lt;br /&gt;
* Phpinfo attached? (Y/N):&lt;br /&gt;
&lt;br /&gt;
For the last two items, try to include the following in your post as an attachment:&lt;br /&gt;
* A copy of your phpinfo output as shown in your browser (see the instructions above for an explanation of how to obtain this).&lt;br /&gt;
* A copy of the Moodle configuration file. This is located in the directory moodle and is named config.php&lt;br /&gt;
&lt;br /&gt;
Copy and paste both of these into a single text file (using vi, Notepad, etc) and attach this to your post.&lt;br /&gt;
&lt;br /&gt;
If you cannot provide your phpinfo, try to copy &amp;amp; paste and complete these in your post:&lt;br /&gt;
* Webserver (e.g. Apache/IIS) version:&lt;br /&gt;
* Database server (e.g. MySQL, PostgreSQL) version:&lt;br /&gt;
* PHP version:&lt;br /&gt;
&lt;br /&gt;
For installation on web hosting accounts: contact your support desk who should be able to tell you this information.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Security Warning&#039;&#039;&#039;: Make sure you edit any files and delete any passwords before posting onto the forum.&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==What &amp;amp; where are Moodle&#039;s configuration settings stored?==&lt;br /&gt;
Configuration settings are stored in the config.php file stored in your moodle folder. This file is created during the installation process. If there is a problem and the installation cannot create the file, you can try creating it manually from the [[Configuration file]] docs. Please remember that manually editing the file is not recommended and may lead to blank pages, especially if there are additional spaces and/or lines after the final php closing tag &amp;quot;?&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Running a health check==&lt;br /&gt;
Moodle contains a script that will help identify common php and webserver configuration problems as well as configuration problems. It is a good idea to run this script to check if you are having post-installation problems. Use your browser to run this file:&lt;br /&gt;
&lt;br /&gt;
 http://www.mymoodle.com/moodle/admin/health.php&lt;br /&gt;
&lt;br /&gt;
Change the above line if you have installed moodle in the webroot instead of a folder inside the webroot.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Downloading previous releases of Moodle==&lt;br /&gt;
* &#039;&#039;&#039;Generic Packages&#039;&#039;&#039;: If your server does not meet the [[Installing_Moodle#Requirements | requirements]] for the current version of Moodle, you can download previous releases by using wget, lynx or curl with this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
:For example: to download Moodle version 1.5, use http://download.moodle.org/stable15. You&#039;ll see a directory tree with the files displayed. Click on the one you want and download as normal - if you require the latest update of the version, scroll to the end of the list and download the &amp;quot;moodle-latest&amp;quot; file, or alternatively use these URLs for zip or tgz downloads:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].tgz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Changes made in the version in the last month are listed in the &amp;quot;CHANGES&amp;quot; file in the directory listing. The files you download contain Moodle code and are not the Windows or Mac packages - so you need to have a webserver, a database server and PHP already installed. The earliest version available is Moodle 1.3.&lt;br /&gt;
* &#039;&#039;&#039;Windows Packages&#039;&#039;&#039;: To download previous releases of the Moodle packages for Windows, use this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/windows/MoodleWindowsInstaller-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Mac Packages&#039;&#039;&#039;: To download previous releases of the Mac pacakges, use either of these URLs (depending on whether you need the Intel or PPC package):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-Intel-[version_number].dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-PPC-[version_number}.dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Using CVS&#039;&#039;&#039;: You can also use CVS to download older releases and incremental releases of the Moodle generic packages, e.g. Moodle 1.5.4 - see the [[CVS_for_Administrators | CVS documentation]].&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
== How to enable and check PHP error logs==&lt;br /&gt;
PHP can be set up to log errors in a variety of different ways: two of these involve the use of the php.ini file and the ini_set command. &lt;br /&gt;
* &#039;&#039;&#039;Using the php.ini file&#039;&#039;&#039;: The log settings are contained in the php.ini file stored on the server. If you don&#039;t know where that is, edit your Moodle &#039;&#039;config.php&#039;&#039; and add the following as the second line&lt;br /&gt;
&lt;br /&gt;
  phpinfo();&lt;br /&gt;
&lt;br /&gt;
:then reload the web page. Look for the entry &#039;&#039;&#039;Configuration File (php.ini) Path&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:When you have located php.ini open it in your favorite text editor. Find the &#039;&#039;&#039;Error handling and logging&#039;&#039;&#039; section of the php.ini file. Make sure that both &#039;&#039;&#039;display_errors = On&#039;&#039;&#039;, &#039;&#039;&#039;display_startup_errors = On&#039;&#039;&#039; and &#039;&#039;&#039;log_errors = On&#039;&#039;&#039; are present and uncommented. Check the value of &#039;&#039;&#039;error_log&#039;&#039;&#039; - 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).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Using ini_set commands&#039;&#039;&#039;: If you are using Moodle 1.7 or higher, the previous steps are not enough. In those versions error logging parameters are dependant on certain administrative settings that you specify in the debugging section. The problem is that if you can&#039;t access the administrative pages, you can&#039;t set the debugging options. So the only way to modify them is by adding the following lines to your config.php file, just before the last line (the one containing a single&#039;?&amp;gt;&#039; only):&lt;br /&gt;
&lt;br /&gt;
  ini_set (&#039;display_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;log_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;display_startup_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;error_reporting&#039;, E_ALL);&lt;br /&gt;
  $CFG-&amp;gt;debug = DEBUG_ALL;&lt;br /&gt;
&lt;br /&gt;
:This will enable the same settings specified above even if Moodle sets them otherwise. &lt;br /&gt;
:&#039;&#039;&#039;Important&#039;&#039;&#039;: Remember to put them just before the last line of config.php.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Any text I add with an apostrophe (&#039;) or a quote (&amp;quot;) causes errors or comes up with a slash added==&lt;br /&gt;
&lt;br /&gt;
Problems caused by apostrophes are caused by incorrect &amp;quot;magic quotes&amp;quot; settings. Moodle requires the following settings in the php.ini file (which are usually the default):&lt;br /&gt;
&lt;br /&gt;
 magic_quotes_runtime = Off&lt;br /&gt;
&lt;br /&gt;
Starting in 2.0 it is strongly recommended to disable magic quotes completely&lt;br /&gt;
&lt;br /&gt;
  magic_quotes_gpc = Off&lt;br /&gt;
&lt;br /&gt;
Please see [[Installing Moodle]] for more details.&lt;br /&gt;
&lt;br /&gt;
If you are using [[Debian_GNU/Linux_installation|Debian]] then the problem might be in the version of PHP that you have installed. Have a look at this [http://tracker.moodle.org/browse/MDL-9691 bug report ]  to see if it matches your situation.&lt;br /&gt;
&lt;br /&gt;
==Email copies are not being sent from my forums==&lt;br /&gt;
&lt;br /&gt;
You &#039;&#039;must&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
Basically, you need to set up a process to regularly call the script &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://yoursite/admin/cron.php&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Please refer to the [[Cron|cron instructions]].&lt;br /&gt;
&lt;br /&gt;
Tips:&lt;br /&gt;
* Try the default settings in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039;. This generally works.&lt;br /&gt;
*Make sure that &#039;&#039;allowuseremailcharset&#039;&#039; in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039; is set to No. Setting this to Yes can cause a problem in some versions of Moodle.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Error: database connection failed==&lt;br /&gt;
&lt;br /&gt;
If you get errors like &amp;quot;database connection failed&amp;quot; or &amp;quot;could not connect to the database you specified&amp;quot;, here are some possible reasons and some possible solutions.&lt;br /&gt;
&lt;br /&gt;
* Your &#039;&#039;&#039;database server&#039;&#039;&#039; isn&#039;t installed or running. To check this for MySQL try typing the following command line&lt;br /&gt;
 $telnet database_host_name 3306&lt;br /&gt;
:You should get a cryptic response which includes the version number of the MySQL server. &lt;br /&gt;
* If you are attempting to run &#039;&#039;&#039;two instances of Moodle on different ports&#039;&#039;&#039;, use the ip address of the host (not localhost) in the $CFG-&amp;gt;dbhost setting, e.g. $CFG-&amp;gt;dbhost = 127.0.0.1:3308.&lt;br /&gt;
* You don&#039;t have the &#039;&#039;&#039;PHP mysql or postgresql extensions&#039;&#039;&#039; installed (please refer to FAQ re. whether PHP is installed).&lt;br /&gt;
* You haven&#039;t created a &#039;&#039;&#039;Moodle database and assigned a user&#039;&#039;&#039; with the correct privileges to access it. &lt;br /&gt;
* The &#039;&#039;&#039;Moodle database settings&#039;&#039;&#039; are incorrect. The database name, database user or database user password in your Moodle configuration file &#039;&#039;config.php&#039;&#039; are incorrect. Use phpMyAdmin to set up and check your MySQL installation.&lt;br /&gt;
* Check that there are &#039;&#039;&#039;no apostrophes or non-alphabetic letters&#039;&#039;&#039; in your MySQL username or password.&lt;br /&gt;
* You are using MySQL version 4.1 or higher but the PHP MySQL extension is pre-4.1 (check in your phpinfo output). In this case the &#039;&#039;&#039;default password hashing algorithm&#039;&#039;&#039; is incompatible with that available in the PHP mysql extension versions 4.x.x. Use these MySQL commands to change the passwords to the old format:&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt;SET PASSWORD FOR &#039;root&#039;@&#039;localhost&#039; = OLD_PASSWORD(&#039;password&#039;);&lt;br /&gt;
 mysql&amp;gt;SET PASSWORD FOR &#039;moodleuser&#039;@&#039;localhost&#039; = OLD_PASSWORD(&#039;password&#039;);&lt;br /&gt;
&lt;br /&gt;
:Also, consider upgrading your PHP MySQL extension. See [http://dev.mysql.com/doc/mysql/en/old-client.html this MySQL document] for further information on how to deal with this problem.&lt;br /&gt;
* You are using Fedora core 3 or some other Linux system with &#039;&#039;&#039;SELinux installed&#039;&#039;&#039; and enabled. See the following URL for information on how to disable SELinux: http://fedora.redhat.com/projects/selinux/ If you don&#039;t want to disable SELinux, you have to allow httpd process to create network connections:&lt;br /&gt;
&lt;br /&gt;
 setsebool httpd_can_network_connect true&lt;br /&gt;
 &lt;br /&gt;
* Mac OSX users -- if you are running MySQL on a Mac OSX, try changing &#039;&#039;&#039;$CFG-&amp;gt;dbhost&#039;&#039;&#039; from &#039;localhost&#039; to &#039;127.0.0.1&#039;&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: MySQL page on [http://dev.mysql.com/doc/refman/5.0/en/common-errors.html common errors] which lists several possible scenarios for connection failure, with advice on how to fix the problems.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I can&#039;t log in - I just stay stuck on the login screen==&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;src=bar_sch_nam Norton firewall products].&lt;br /&gt;
&lt;br /&gt;
The server admin can also fix this for everyone by changing the &#039;&#039;secureforms&#039;&#039; variable to &#039;No&#039; in the security section of Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]].&lt;br /&gt;
&lt;br /&gt;
Another possible cause of this problem is that sessions are not configured properly on the server. You can test this by calling the script &amp;lt;nowiki&amp;gt;http://yourserver/moodle/lib/session-test.php&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are still having problems, read the [[Can_not_log_in | Cannot log in]] page.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I can&#039;t log in with message &amp;quot;Please verify that the current setting of session.save_path is correct&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
This error occurs when PHP is having problems saving its session files. You may also see these other error messages displayed on the screen or in your log files:&lt;br /&gt;
&lt;br /&gt;
 Warning: Unknown: open(some-path/sessions/sess_acbf942a7399db3489ffa910e35d5242, O_RDWR)&lt;br /&gt;
 failed: Permission denied (13) in Unknown on line 0&lt;br /&gt;
&lt;br /&gt;
 Warning: Unknown(): open(some-path/sessions/sess_acbf942a7399db3489ffa910e35d5242, O_RDWR) &lt;br /&gt;
 failed: No space left on device (28) in Unknown on line 0&lt;br /&gt;
&lt;br /&gt;
 Warning: Unknown: Failed to write session data (files). Please verify that the current &lt;br /&gt;
 setting of session.save_path is correct (some-path/sessions) in Unknown on line 0 &lt;br /&gt;
&lt;br /&gt;
To temporarily bypass these errors, &#039;&#039;&#039;use database sessions&#039;&#039;&#039; by editing your [[Configuration_file | moodle configuration file]] and adding this line:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dbsessions = true;&lt;br /&gt;
&lt;br /&gt;
Database sessions may overload your mysql database and are not ideal in a shared hosting environment, so if this solves the problem, you can start fixing the problem as follows:&lt;br /&gt;
* Check &#039;&#039;&#039;access rights&#039;&#039;&#039;. The session.save_path should be accessible by the apache user. Try this command:&lt;br /&gt;
&lt;br /&gt;
 chown -R apache:apache some-path/sessions&lt;br /&gt;
&lt;br /&gt;
:This assumes that &#039;apache&#039; is the name of the user your webserver runs under - it could also be &#039;nobody&#039;.&lt;br /&gt;
* Check the &#039;&#039;&#039;permissions&#039;&#039;&#039; to the directory that PHP is trying to save to (session.save_path = some-path/sessions). Set the permissions initially to 0777 (everyone read, write, execute) with this command:&lt;br /&gt;
&lt;br /&gt;
 chmod -R 0777 some-path/sessions&lt;br /&gt;
&lt;br /&gt;
:If this fixes the problem, reduce the permissions (700 is recommended).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Session problems can be specific to your server environment. As an example, see [http://moodle.org/mod/forum/discuss.php?d=55925#254596 this forum discussion] about session problems with Lycos hosting.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I log in but the login link doesn&#039;t change. I am logged in and can navigate freely.==&lt;br /&gt;
&lt;br /&gt;
Make sure the URL in your &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; setting is exactly the same as the one you are actually using to access the site.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I keep getting this error: A server error that affects your login session was detected.==&lt;br /&gt;
&lt;br /&gt;
Please refer to the Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=73716 A server error that affects your login session was detected. Please login again or restart your browser.].&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I keep getting this error: Failed opening required &#039;/web/moodle/lib/setup.php&#039;==&lt;br /&gt;
&lt;br /&gt;
In your &#039;&#039;config.php&#039;&#039;, the setting that you use for the dirroot variable must be the complete path from the root of your server&#039;s hard drive.&lt;br /&gt;
&lt;br /&gt;
Sometimes people only use the path from their home directory, or relative to the root of the web server directory.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==My pages show fatal errors such as : Parse error, call to undefined function: get_string()==&lt;br /&gt;
&lt;br /&gt;
If you see errors like:&lt;br /&gt;
&lt;br /&gt;
 Parse error: parse error, unexpected T_VARIABLE in /path/to/moodle/config.php on line 94 &lt;br /&gt;
 Fatal error: Call to undefined function: get_string() in /path/to/moodle/mod/resource/lib.php&lt;br /&gt;
 on line 11&lt;br /&gt;
&lt;br /&gt;
then you have probably left out a semi-colon or closing quote from a line in &#039;&#039;config.php&#039;&#039; (previous to line 94).&lt;br /&gt;
&lt;br /&gt;
Another possibility is that you edited &#039;&#039;config.php&#039;&#039; in a program like Word and saved it as a HTML web page, instead of using a plain text editor like Notepad.&lt;br /&gt;
&lt;br /&gt;
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 (&amp;lt;? ?&amp;gt;) instead of proper ones (&amp;lt;?php ?&amp;gt;). 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:&lt;br /&gt;
&lt;br /&gt;
 short_open_tag = On&lt;br /&gt;
&lt;br /&gt;
You should never find short tags in core moodle code. If you do, please file a bug in the bug tracker.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Serious Error! Could not set up the site!==&lt;br /&gt;
&lt;br /&gt;
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!].&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Uploaded files give &amp;quot;File not found&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
For example: Not Found: The requested URL /moodle/file.php/2/myfile.jpg was not found on this server.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;httpd.conf&#039;&#039;, or to a &#039;&#039;.htaccess&#039;&#039; file in your local directory (see [[Installing Moodle]] for more details):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
Note, this will ONLY work for Apache versions 2.x.&lt;br /&gt;
&lt;br /&gt;
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&#039;t be able to use relative links within HTML resources.&lt;br /&gt;
&lt;br /&gt;
To use this alternative method, you should change the &#039;&#039;slasharguments&#039;&#039; variable. For moodle versions &amp;lt; 1.7, this is located in the Operating System section of &#039;&#039;Administration &amp;gt; Configuration &amp;gt; [[admin/config|Variables]]&#039;&#039;. In later versions, this option is located in &#039;&#039;Site Administration &amp;gt; Server &amp;gt; HTTP&#039;&#039;. You should now be able to access your uploaded files.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==When I go to the admin page, I get told to make dirroot blank!==&lt;br /&gt;
&lt;br /&gt;
If you see errors like this:&lt;br /&gt;
&lt;br /&gt;
 Please fix your settings in config.php: &lt;br /&gt;
 You have: $CFG-&amp;gt;dirroot = &amp;quot;/home/users/fred/public_html/moodle&amp;quot;; &lt;br /&gt;
 but it should be: $CFG-&amp;gt;dirroot = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;admin/index.php&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 if ($dirroot != $CFG-&amp;gt;dirroot) {&lt;br /&gt;
&lt;br /&gt;
and change it to this:&lt;br /&gt;
&lt;br /&gt;
 if (!empty($dirroot) and $dirroot != $CFG-&amp;gt;dirroot) {&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==When trying to add a resource I receive error messages==&lt;br /&gt;
&lt;br /&gt;
Assuming you are using Apache, then it&#039;s quite likely that your setting in &#039;&#039;config.php&#039;&#039; for &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; is different from the actual URL you are using to access the site. Also try turning off the &#039;&#039;secureforms&#039;&#039; variable in the security section of Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]].&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Why are all my pages blank?==&lt;br /&gt;
&lt;br /&gt;
Check the dirroot variable in &#039;&#039;config.php&#039;&#039;. You must use complete, absolute pathnames e.g.&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dirroot = &amp;quot;d:\inetpub\sites\www.yoursite.com\web\moodle&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
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 see [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | How to enable and check PHP error logs]].&lt;br /&gt;
&lt;br /&gt;
To determine if MySQL support is your problem, insert this as the second line in your &#039;&#039;config.php&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
 phpinfo();&lt;br /&gt;
&lt;br /&gt;
then reload the web page. Examine the output closely to see if MySQL is supported. If not look for a package you are missing.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Why is a particular page blank or incomplete? ==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your web server log files!!&#039;&#039;&#039; &lt;br /&gt;
:If a particular page is blank or incomplete (it doesn&#039;t display the footer), before you do anything else [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | check your error logs]]. Having established that PHP error 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.&lt;br /&gt;
&lt;br /&gt;
*If you are &#039;&#039;&#039;upgrading to a new version of Moodle&#039;&#039;&#039;, check that you do not have an old version of a non-standard block or module installed. Remove any such blocks or modules installed using the admin settings page and start the install process again. However, do also make sure that you have included all optional plugins that were required by your courses. &lt;br /&gt;
&lt;br /&gt;
*If you &#039;&#039;&#039;do not see any blocks listed&#039;&#039;&#039;, turn editing on and remove any blocks that you have added to that page and try reloading.&lt;br /&gt;
&lt;br /&gt;
*You may get this error immediately after &#039;&#039;&#039;selecting a language&#039;&#039;&#039;. At this stage of the installation process your Moodle computer may need to connect to the Internet and download a language pack, so check that the computer can access the Internet by using a browser. Check also that your PHP settings are as given in the Moodle [[Installing_Moodle#Requirements | Moodle Requirements]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=97734 PHP configuration error] forum discussion  &lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Installation hangs when setting-up database tables==&lt;br /&gt;
Sometimes the installation will hang when setting up tables. This will be an abrupt hang with half the page displayed in the browser and/or other outputs removed. Examples are:&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Truncated mysql statements&#039;&#039;&#039;:&lt;br /&gt;
 &lt;br /&gt;
 (mysql): SET NAMES &#039;utf8&#039;&lt;br /&gt;
 --------------------------------------------------------------------------------&lt;br /&gt;
 (mysql): SHOW LOCAL VARIABLES LIKE &#039;character_set_database&#039;&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 (no more statements are displayed)   &lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Missing Continue button&#039;&#039;&#039;: The “Scroll to continue” link is displayed but no “Continue” button is there. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: There is an exception to this when upgrading an existing database and the installation may appear to hang at the roles generation phase. This process can take a very long time - so please be patient.&lt;br /&gt;
&lt;br /&gt;
Below are some solutions you can try to overcome this problem:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check for mysql limits&#039;&#039;&#039;. This is often a mysql error and not a php error. Check that there is no limit placed on your mysql database, e.g. a &amp;quot;questions&amp;quot; limit.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your .htaccess files&#039;&#039;&#039;. If the install is on a webhost, adding the following line to the .htaccess file in the moodle directory has been known to solve the problem.&lt;br /&gt;
 AddType x-mapp-php5 .php&lt;br /&gt;
&lt;br /&gt;
:Try also renaming the .htaccess file so that it is disabled.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Code customizations&#039;&#039;&#039;. You may also want to look and see if you&#039;ve customized any of your code.  Look at the last successful table, and then look at the block, mod, or other code that is referenced by that table.  For example, if your install hangs and continues to say that the forum tables were successful as the last message, look at /mod/forum/ for any custom code.  If you have customized code, backup those files and replace with the correct files.  You can then restart the install by renaming config.php or reinstalling your database from the backup.  If your install is successful, you can make your code changes back into the stock Moodle code.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your memory limit&#039;&#039;&#039;. It may also be that the &amp;quot;memory_limit&amp;quot; in your php.ini is set too low. Please check your php.ini file and allocate the recommended amount (see [https://docs.moodle.org/en/Installing_Moodle#Requirements Moodle requirements]). For Moodle version 1.8 and above at least 40MB is  recommended.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Upgrade incrementally&#039;&#039;&#039;. To avoid this problem when upgrading, it is recommended to upgrade via each version of Moodle, for example 1.7 -&amp;gt; 1.8 -&amp;gt; 1.9 (with the exception of upgrading from 1.5 or 1.6, when it is recommended that 1.7 is skipped, in other words upgrade 1.5 -&amp;gt; 1.6 -&amp;gt; 1.8 -&amp;gt; 1.9).&lt;br /&gt;
&lt;br /&gt;
A work-around to this problem is to setup a working Moodle system on your local PC or server using the [http://download.moodle.org Moodle Packages]. Once you have a running Moodle, [https://docs.moodle.org/en/Upgrading_Moodle#Backup_important_data backup the database] and import to your webhost. Then backup the Moodle code itself (the &amp;quot;moodle&amp;quot; directory on your PC) and copy this to your webhost using (for example) FTP. Finally, edit the moodle/config.php file for the new settings that have to be changed for the webhost.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Why can&#039;t I upload a new image into my profile?==&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see anything on your user profile pages to let you upload user images then it&#039;s usually because GD is not enabled on your server. GD is a library that allows image processing.&lt;br /&gt;
&lt;br /&gt;
1. Make sure &#039;&#039;&#039;GD has been included in your PHP installation&#039;&#039;&#039;. You can check this by going into Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[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.&lt;br /&gt;
&lt;br /&gt;
2. If Moodle thinks GD is not installed, then you will need to &#039;&#039;&#039;install the GD library&#039;&#039;&#039;. &lt;br /&gt;
*On Unix you may need to re-compile PHP with arguments something like this:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-gd &lt;br /&gt;
 --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-ttf --enable-gd-native-ttf &lt;br /&gt;
 --enable-magic-quotes --with-mysql --enable-sockets --enable-track-vars &lt;br /&gt;
 --enable-versioning --with-zlib&lt;br /&gt;
&lt;br /&gt;
* On Windows this is usually a matter of &amp;quot;turning on&amp;quot; the extension in PHP by editing your php.ini file. To do this remove the semicolon for the php_gd2.dll extension - check that this file is actually present in your php extensions  folder first (search your php.ini for extension_dir to determine where this points to on your hard disk). You should then have a line that looks like this:&lt;br /&gt;
 extension=php_gd2.dll&lt;br /&gt;
&lt;br /&gt;
:Windows users should see the [[Installing AMP|installation instructions]] for further help. &lt;br /&gt;
&lt;br /&gt;
3. Remember to &#039;&#039;&#039;restart your webserver&#039;&#039;&#039; (if possible) and re-visit the Moodle configuration page after making any changes to PHP so it can pick up the correct version of GD.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=44271 Profile pictures] for additional information.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Why do I keep getting error messages about &amp;quot;headers already sent&amp;quot;?==&lt;br /&gt;
&lt;br /&gt;
If you see errors like this:&lt;br /&gt;
&lt;br /&gt;
 Warning: Cannot add header information - headers already sent by &lt;br /&gt;
 (output started at /webs/moodle/config.php:87) in /webs/moodle/lib/moodlelib.php &lt;br /&gt;
 on line 1322 &lt;br /&gt;
&lt;br /&gt;
 Warning: Cannot add header information - headers already sent by &lt;br /&gt;
 (output started at /webs/moodle/config.php:87) in /webs/moodle/lib/moodlelib.php &lt;br /&gt;
 on line 1323 &lt;br /&gt;
&lt;br /&gt;
 Warning: Cannot add header information - headers already sent by &lt;br /&gt;
 (output started at /webs/moodle/config.php:87) in /webs/moodle/login/index.php &lt;br /&gt;
 on line 54&lt;br /&gt;
&lt;br /&gt;
you have blank lines or spaces after the final &amp;lt;code&amp;gt;?&amp;gt;&amp;lt;/code&amp;gt; in your &#039;&#039;config.php&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
== Why doesn&#039;t my Moodle site display the time and date correctly? ==&lt;br /&gt;
&lt;br /&gt;
Each language requires a specific language code (called a &#039;&#039;&#039;locale&#039;&#039;&#039; code) to allow dates to be displayed correctly. The language packs contain default standard codes, but sometimes these don&#039;t work on Windows servers.&lt;br /&gt;
&lt;br /&gt;
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. &amp;quot;esp_esp&amp;quot; for spanish)&lt;br /&gt;
&lt;br /&gt;
These new locale codes can be entered on the Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]] page, where they override the ones in the currently chosen language pack.&lt;br /&gt;
&lt;br /&gt;
==I receive this error &amp;quot;500:Internal Server Error&amp;quot;==&lt;br /&gt;
There are several possible causes for this error:&lt;br /&gt;
&lt;br /&gt;
1. &#039;&#039;&#039;Syntax error&#039;&#039;&#039;: There is a syntax error in your .htaccess or httpd.conf files. The way in which directives are written [http://httpd.apache.org/docs/1.3/howto/htaccess.html#when differs] depending on which file you are using. You can test for configuration errors in your Apache files using the command:&lt;br /&gt;
 #apachectl configtest&lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;&#039;PHPsuexec&#039;&#039;&#039;: Your server does not support .htaccess files, especially if it is running PHPsuexec, which is an Apache module used for increasing the security of a site on a hosted system. In this situation:&lt;br /&gt;
&lt;br /&gt;
- you may also see a 403: Forbidden error.&lt;br /&gt;
&lt;br /&gt;
- the webserver executes under your own username and all files have a maximum permissions level of 755. Check that this is set for your Moodle directory in your control panel or (if you have access to the shell) use this command:&lt;br /&gt;
 #chmod -R 755 moodle&lt;br /&gt;
&lt;br /&gt;
- use a PHP.INI file instead of a .htaccess in the directory where the Moodle PHP script is being executed. For example: if you are receiving a memory exhausted error when your server is executing the file moodle/admin/cron.php, use a PHP.INI file to change your memory_limit and copy it to the moodle/admin directory. Remember that for PHP4, PHP.INI files are per-directory, so you&#039;ll need to copy it to each sub-directory. If you are using PHP5 or higher on a shared host, check with your host on whether they support custom PHP.INI files, and how to create them. The syntax used in a PHP.INI file is different to a .htaccess file and you need to take out php_value/php_flag at the beginning of the line and use an equals sign to assign a value, e.g.&lt;br /&gt;
 php_value memory_limit 128M &amp;lt;-- .htaccess&lt;br /&gt;
 memory_limit = 128M         &amp;lt;-- php.ini equivalent &lt;br /&gt;
&lt;br /&gt;
3. &#039;&#039;&#039;Incompatible directive&#039;&#039;&#039;: You may have a directive in your .htaccess or httpd.conf files which are not compatible with your web server version. Check your webserver documentation.&lt;br /&gt;
&lt;br /&gt;
==I receive this error &amp;quot;403: Forbidden&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Check your webserver configuration. See also the section above I receive this error &amp;quot;500:Internal Server Error&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==How do I uninstall Moodle?==&lt;br /&gt;
&#039;&#039;&#039;Moodle package installation&#039;&#039;&#039;: If you have downloaded a Moodle package, simply uninstall using your system commands. On Windows PCs, you should access the Control Panel -&amp;gt; Add/Remove Programs. Select the package name and click Change or Remove Programs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Webhost/manual installation&#039;&#039;&#039;: If you have installed Moodle manually or have installed onto a webhost, follow these steps:&lt;br /&gt;
*Delete the moodle database using this mysql command (or delete using your mysql client, e.g. PHPMyAdmin):&lt;br /&gt;
&amp;lt;pre&amp;gt;sql&amp;gt;DROP DATABASE moodle;&amp;lt;/pre&amp;gt;&lt;br /&gt;
:In the above example replace &#039;moodle&#039; with the name of the moodle database you created when installing.&lt;br /&gt;
*Delete the moodledata directory. If you, or your users, have uploaded materials into this directory take a copy of these before deleting this directory.&lt;br /&gt;
*Delete the moodle directory itself. This will delete all of the moodle PHP script files.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==How do I upgrade Moodle? Do I just overwrite the files?==&lt;br /&gt;
Do not overwrite files, it may cause strange errors. You should read the [[Upgrade]] documentation before proceeding.&lt;br /&gt;
&lt;br /&gt;
==Migrating Moodle to a new site or server==&lt;br /&gt;
Migrating Moodle means that you have to move the current installation to a new server, and so may have to change IP addresses or DNS entries. To do this you will need to change the $CFG-&amp;gt;wwwroot value in the config.php on the new server. You will also have to change any absolute links stored in the database backup file (before restoring the file on the new server) either using the admin/replace.php script, your text editor or another &amp;quot;search and replace&amp;quot; tool, e.g. sed. For more details see the [[Moodle_migration | Moodle Migration]] page.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Fatal error allowed memory size exhausted. How do I increase my php memory limit?==&lt;br /&gt;
You will sometimes see an error message something like this:&lt;br /&gt;
 Fatal error: Allowed memory size of 67108864 bytes exhausted &lt;br /&gt;
 (tried to allocate xx bytes) in /var/www/moodle/yyyy.php&lt;br /&gt;
This error means that the php memory_limit value is not enough for the php script. The memory_limit value is the &amp;quot;allowed memory size&amp;quot; - 64M in the example above (67108864 bytes / 1024 = 65536 KB. 65536 KB / 1024 = 64 MB). You will need to increase the php memory_limit value until this message is not shown anymore. There are two methods of doing this.&lt;br /&gt;
*On a hosted installation, add the following line to your .htaccess file (or create one in the moodle directory if it does not already exist):&lt;br /&gt;
 php_value memory_limit &amp;lt;value&amp;gt;M&lt;br /&gt;
 Example: php_value memory_limit 40M&lt;br /&gt;
*If you have your own server with shell access, edit your php.ini file (make sure it&#039;s the correct one by checking in your phpinfo output) as follows:&lt;br /&gt;
 memory_limit &amp;lt;value&amp;gt;M&lt;br /&gt;
 Example: memory_limit 40M&lt;br /&gt;
Remember that you need to restart your web server to make changes to php.ini effective. An alternative is to disable the memory_limit by using the command &#039;&#039;memory_limit 0&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Why does my new installation display correctly on the server, but when I view it from a different machine, styles and images are missing?==&lt;br /&gt;
In the installation instructions, one of the suggested settings for &#039;webroot&#039; is &#039;localhost&#039;. This is fine if all you want to do is some local testing of your new Moodle installation. If, however, you want to view your new installation from another machine on the same local area network, or view your site on the internet, you will have to change this setting:&lt;br /&gt;
*For local testing, &#039;localhost&#039; is fine for the webroot ($CFG-&amp;gt;wwwroot in config.php). &lt;br /&gt;
*If you want to test your site from other machines on the same local area network (LAN), then you will have to use the private ip address of the serving machine, (e.g. 192.168.1.2/moodle) or the network name of the serving computer (e.g. network_name_of_serving_machine/moodle) as the web root. Depending on your LAN setup, it may be better to use the network name of the computer rather than its (private) ip address, because the ip address can and will change from time to time. If you don&#039;t want to use the network name, then you will have to speak to your network administrator and have them assign a permanent ip address to the serving machine.&lt;br /&gt;
*Finally, if you want to test your new installation across the internet, you will have to use either a domain name or a permanent (public) ip address/moodle as your web root. To handle both types of access, see [https://docs.moodle.org/en/masquerading masquerading].&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Maximum upload file size - how to change it?==&lt;br /&gt;
There are several places to change the maximum file upload size. The first place to check is the Administration block.   Security -&amp;gt; Site Policies -&amp;gt; and look for &amp;quot;Maximum Uploaded File Size&amp;quot;.  This is the &amp;quot;maxbyte&amp;quot; variable found in older versions of Moodle (under Admin &amp;gt; Variables). Teachers may also set the maximum file size by the [[Course_settings#Maximum_upload_size|course administration block]].&lt;br /&gt;
&lt;br /&gt;
The second place to check are the server files.  The php.ini file has a limit which will override any other setting. (Hint: remember to restart your server for changes to take effect).  For more help see:&lt;br /&gt;
*[[Administration_FAQ#How_do_the_limits_on_uploaded_files_work.3F]]&lt;br /&gt;
*[[Installing_Moodle#Recheck_PHP_settings]]&lt;br /&gt;
*[[Installing_Moodle#Using_a_.htaccess_file_for_webserver_and_PHP_settings]]&lt;br /&gt;
*[[Site_policies#Maximum_uploaded_file_size]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:FAQ Instalación]]&lt;br /&gt;
[[fr:FAQ d&#039;installation]]&lt;br /&gt;
[[nl:Installatie FAQ]]&lt;br /&gt;
[[ja:インストールFAQ]]&lt;br /&gt;
[[ru:Установка FAQ]]&lt;br /&gt;
[[pl:Instalacja FAQ]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:RedHat_Linux_installation&amp;diff=42615</id>
		<title>Talk:RedHat Linux installation</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:RedHat_Linux_installation&amp;diff=42615"/>
		<updated>2008-08-25T11:14:33Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: New section: Reference section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Y en red hat linuex enterprise 4 o superior, cómo es el proceso de instalación?&lt;br /&gt;
&lt;br /&gt;
== Reference section ==&lt;br /&gt;
&lt;br /&gt;
Ever since July 29, 2008, there has been a Reference section at the end of this article saying &amp;quot;see these discussion for GD:&amp;quot; and it ends there. There is no discussion to see! I&#039;m not even going to correct the grammar, because I don&#039;t know whether it should be singular or plural. Thank you, Mr. Chuang. --[[User:Richard Enison|Richard Enison]] 06:14, 25 August 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=42466</id>
		<title>Installing Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=42466"/>
		<updated>2008-08-22T16:14:41Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: update tutorial availability info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Firstly don&#039;t panic! :-)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This guide explains how to install Moodle for the first time. For some of these steps it goes into a lot of detail to try and cover the majority of possible web server setups, so this page may look long and complicated. Don&#039;t panic, once you know how to do it you can install Moodle in minutes!&lt;br /&gt;
&lt;br /&gt;
If you have problems please read this page carefully - most common issues are answered in here. If you still have trouble, you can seek help from the Moodle community via  [http://moodle.org/course/view.php?id=5 moodle.org Using Moodle].&lt;br /&gt;
&lt;br /&gt;
Another option is to contact a [http://moodle.com/hosting/ Moodle Partner providing Moodle hosting] who can completely maintain Moodle for you, so that you can ignore all this and get straight into educating! A Moodle partner is the preferred option but if you decide to choose a hosting company that has cpanel then [http://otaru-jc.ac.jp/hagley/settingupmoodleonhostingwithcpanel.swf this tutorial will guide you]  through the process of choosing a host and setting up moodle via cpanel (had not been available the last few weeks; now tentatively seems to be available again; see [http://englishforum.sgu.ac.jp/moodle/ this portal page]). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; some hosting companies offer one-click moodle install options, which whilst sometimes effective, usually use old (sometimes years old) versions of moodle and sometimes simply don&#039;t work. If one of these goes wrong, your best bet is often to start from scratch following the instructions here yourself. Its almost certainly quicker.&lt;br /&gt;
&lt;br /&gt;
If you want to run Moodle on your own computer and this page looks a bit daunting, then please see our guides on how to install one of Moodle&#039;s complete [[Complete install packages for Windows|Windows packages]], [[Complete Install Packages for Mac OS X|Mac OS packages]] or [[Installing AMP |Installing Apache, MySQL and PHP(AMP)]]. They provide alternative instructions to install all this on most popular platforms.&lt;br /&gt;
&lt;br /&gt;
==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
Moodle is primarily developed in Linux using [[Apache]], [[MySQL]] and [[PHP]] (also sometimes known as the LAMP platform), but is also regularly tested with Windows XP/2000/2003 (WAMP), Solaris 10 (Sparc and x64), Mac OS X and Netware 6 operating systems. Support for PostgreSQL, Oracle and Microsoft SQL Server is also available.&lt;br /&gt;
&lt;br /&gt;
The procedure for installing Moodle on the Windows platform (e.g. Windows Server, IIS and MSSQL) varies slightly to the procedure for the LAMP platform. See [[Installation for Windows 2003 with IIS]] for more details.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blank page problem while installing Moodle on Windows Vista may occur; following these steps: [[Installing Moodle on Windows Vista]] might help.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note if you are using a hosted account&#039;&#039;&#039;: Most web hosts support all of these requirements by default. You should contact your web host&#039;s support desk to check that this is the case &#039;&#039;&#039;before&#039;&#039;&#039; signing-up with them. It is especially important to ask about any PHP memory limits or MySQL question limits. If your prospective host does not provide a service which meets these requirements, or you are already signed up with them, ask them why and consider taking your business elsewhere if they do not change.&lt;br /&gt;
&lt;br /&gt;
The requirements for Moodle are as follows:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hardware&#039;&#039;&#039; (unless you are using a hosted server). &lt;br /&gt;
* Disk space: 160MB free (min). You will require more free space to store your teaching materials.&lt;br /&gt;
* Memory: 256MB (min), 1GB (recommended). The general rule of thumb is that Moodle can support 50 &#039;&#039;concurrent&#039;&#039; users for every 1GB of RAM, but this will vary depending on your specific hardware and software combination. &lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
* Web server software. Most people use [[Apache]], but Moodle should work fine under any web server that supports [[PHP]], such as [[IIS]] on Windows platforms. PHP does impose requirements on versions of web servers, however these are complex and the general advice is to use the newest version possible of your chosen web server. &lt;br /&gt;
* PHP scripting language. (Please note that there have been issues installing Moodle with [http://www.php-accelerator.co.uk PHP-Accelerator]). There are currently two versions (or branches) of PHP available: PHP4 and PHP5 and the version requirements are listed below.&lt;br /&gt;
** For Moodle version 1.4 or later: PHP4 (version 4.1.0 or later) or PHP5 (version 5.1.0 or later) are supported.&lt;br /&gt;
** For Moodle version 1.6 or later: the PHP4 (version 4.3.0 or later) or PHP5 (version 5.1.0 or later) are supported. &lt;br /&gt;
** Future Moodle versions 2.0 or later will not support PHP4 and will require PHP5 (version 5.2.0 or later).&lt;br /&gt;
** PHP Settings. Check these settings in your php.ini or .htaccess file (if you&#039;re using Apache). For settings which use ON/OFF as their values, you can substitute 1 for ON and 0 for OFF if you prefer. &lt;br /&gt;
*** &#039;&#039;safe_mode&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;memory_limit&#039;&#039; should be at least 16M (32M is recommended for Moodle 1.7 and 40M for Moodle 1.8 or later). Large sites may need more than 128M. PHP 5.2.x requires higher memory_limit values than previous versions of PHP. 64bit operating systems require even more memory.&lt;br /&gt;
*** &#039;&#039;session.save_handler&#039;&#039; needs to be set to FILES.&lt;br /&gt;
*** &#039;&#039;magic_quotes_gpc&#039;&#039; should be ON. (It will be recommended to turn it off in 2.0.)&lt;br /&gt;
*** &#039;&#039;magic_quotes_runtime&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;file_uploads&#039;&#039; needs to be ON.&lt;br /&gt;
*** &#039;&#039;session.auto_start&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;session.bug_compat_warn&#039;&#039; needs to be OFF.&lt;br /&gt;
** PHP Extensions and libraries&lt;br /&gt;
*** The mbstring extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** The iconv extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** [http://www.libgd.org/ GD library] and the [http://www.freetype.org/ FreeType 2] library and extensions are needed to be able to look at the dynamic graphs that the logs pages make.&lt;br /&gt;
*** The mysql extension is required if you are using the MySQL database. Note that in some Linux distributions (notably Red Hat) this is an optional installation.&lt;br /&gt;
*** The pgsql extension is required if you are using the PostgreSQL database.&lt;br /&gt;
*** The pdo and pdo_sqlite extensions are required for the (experimental) SQLite 3 database support.&lt;br /&gt;
*** The curl extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The tokenizer extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The curl and openssl extensions are required for the Moodle network functionality (Moodle 1.8 or later).&lt;br /&gt;
*** Other PHP extensions may be required to support optional Moodle functionality, especially external authentication and/or enrolment (e.g. LDAP extension for LDAP authentication and the sockets extension for Chat server).&lt;br /&gt;
* A working database server: [[MySQL]] or [[PostgreSQL]] are completely supported and recommended for use with any version of Moodle. Support for Microsoft SQL Server and Oracle has been added in Moodle 1.7. MySQL is &#039;&#039;the&#039;&#039; choice for many people because it is very popular, but there are some [[Arguments in favour of PostgreSQL|arguments in favour of PostgreSQL]], especially if you are planning a large deployment.&lt;br /&gt;
** For Moodle 1.5, MySQL (version 3.23 or later) or PostgreSQL (7.4 or later). &lt;br /&gt;
** For Moodle 1.6, MySQL (version 4.1.12 or later) or PostgreSQL (7.4 or later).&lt;br /&gt;
** For Moodle 1.7, MySQL (version 4.1.12 or later), PostgreSQL (7.4 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
** For Moodle 1.8 or later, MySQL (version 4.1.12 or later), PostgreSQL (8.0 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
: MySQL Notes: For Moodle 1.6 or later, If you use latin languages only you can use MySQL 4.1.12. If you are using non-latin languages you require MySQL 4.1.16 or later. Currently the MySQL setting &amp;quot;strict mode&amp;quot; must be OFF (set to &amp;quot;&amp;quot; or &amp;quot;MYSQL40&amp;quot;) in the MySQL configuration file. &lt;br /&gt;
: PostgreSQL Notes: PostgreSQL 7.4 is recommended for earlier Moodle versions, since Moodle 1.8 only PostgreSQL 8.0 and above are supported.&lt;br /&gt;
* For showcases or low to medium-sized installations, Moodle 2.0 also includes (experimental) support for SQLite 3 database. This setup requires no database server, as the database file is stored in a local directory on the server.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== How many users? ==&lt;br /&gt;
&lt;br /&gt;
In addition to the hardware and software requirements, you will also need to think about the capacity of your Moodle installation in terms of the number of users it can handle. There are two numbers to plan for:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Browsing users&#039;&#039;&#039;: the maximum number of users able to browse your Moodle site. This is the number of computers in your organization or on your course (whichever is greater).&lt;br /&gt;
* &#039;&#039;&#039;Concurrent database users&#039;&#039;&#039;: the maximum number of concurrent database users (needed for Moodle activities such as quizzes). This is the number of users who will be using Moodle at the same time. In an educational institution, use your timetable/roster to obtain this figure.&lt;br /&gt;
&lt;br /&gt;
Once you know these figures for your users, you can start work out if your Moodle installation can support this capacity. The exact number of users depends on your hardware/software/network combination. Usually the amount of memory installed (RAM) is the deciding factor but a faster overall processor speed will also help in reducing waiting times for pages to load. &lt;br /&gt;
&lt;br /&gt;
The general rule of thumb for a single server is that the approx max concurrent users = RAM (GB) * 50 and the approx max browsing users = Approx max concurrent users * 5. As an example, a university with 500 total computers on campus and 100 concurrent users at any time will need approx 2GB of RAM on the one server to support the number of concurrent users.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note if you are using a hosted account&#039;&#039;&#039;: Ask your provider what limits are placed on the number of concurrent database connections and the processor load. This will give a good estimate of the number of users your Moodle install can manage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; As of August 31, 2007, Moodle 1.8.2+ is not recommended for large installations, especially if you have large number (e.g. 20,000+) of courses. The main reason is the codes related to ROLES are still not fully optimized with database queries and still need some work. If you are planning to use 1.8.x codes for a larger institution, please make sure that you have sufficient time to do your own testing and performance profiling.  Upgrade to Moodle 1.9!!&lt;br /&gt;
&lt;br /&gt;
[Update] This performance issue has been improved quite a bit in the most recent 1.8.3+ version (see this thread discussion: http://moodle.org/mod/forum/discuss.php?d=83281).  Moodle 1.9 has even more improvements in all areas and is the recommended version.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Download and copy files into place ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to get Moodle, either as a compressed package or via CVS. &lt;br /&gt;
* There are two types of compressed packages on the  [http://download.moodle.org/ download page: http://download.moodle.org/], the standard distribution with Moodle only files and the [[Complete install packages|complete install]], which contains programs to operate Moodle in a web environment.  &lt;br /&gt;
* To use CVS, helpful instructions are available at the [[CVS_for_Administrators | CVS for Administrators]] page. The full [http://cvs.moodle.org/moodle/ Moodle CVS repository] is also available for browsing. &lt;br /&gt;
&lt;br /&gt;
After downloading, unpack the archive using either &lt;br /&gt;
 tar -zxvf [filename]&lt;br /&gt;
or&lt;br /&gt;
 unzip [filename]&lt;br /&gt;
as appropriate. &lt;br /&gt;
&lt;br /&gt;
If using CVS, run the CVS Checkout command.&lt;br /&gt;
&lt;br /&gt;
You will now be left with a directory called &amp;quot;moodle&amp;quot;, containing a number of files and folders.&lt;br /&gt;
&lt;br /&gt;
You can either place the whole folder in your web server documents directory, in which case the site will be located at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com/moodle&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;, or you can copy all the contents straight into the main web server documents directory, in which case the site will be simply &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you are downloading Moodle to your local computer and then uploading it to your web site, it is usually better to upload the whole archive as one file, and then do the unpacking on the server. Even web hosting interfaces like cPanel allow you to uncompress archives in the &amp;quot;File Manager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Structure of moodle directory ===&lt;br /&gt;
&lt;br /&gt;
You can safely skip this section, but here is a quick summary of the contents of the Moodle folder, to help get you oriented:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;config.php&#039;&#039; - contains basic settings. This file does not come with Moodle - you will create it.&lt;br /&gt;
:&#039;&#039;install.php&#039;&#039; - the script you will run to create config.php&lt;br /&gt;
:&#039;&#039;version.php&#039;&#039; - defines the current version of Moodle code&lt;br /&gt;
:&#039;&#039;index.php&#039;&#039; - the front page of the site&lt;br /&gt;
:&#039;&#039;admin/&#039;&#039; - code to administrate the whole server&lt;br /&gt;
:&#039;&#039;auth/&#039;&#039; - plugin modules to authenticate users&lt;br /&gt;
:&#039;&#039;blocks/&#039;&#039; - plugin modules for the little side blocks on many pages&lt;br /&gt;
:&#039;&#039;calendar/&#039;&#039; - all the code for managing and displaying calendars&lt;br /&gt;
:&#039;&#039;course/&#039;&#039; - code to display and manage courses&lt;br /&gt;
:&#039;&#039;doc/&#039;&#039; - help documentation for Moodle (eg this page)&lt;br /&gt;
:&#039;&#039;files/&#039;&#039; - code to display and manage uploaded files&lt;br /&gt;
:&#039;&#039;lang/&#039;&#039; - texts in different languages, one directory per language&lt;br /&gt;
:&#039;&#039;lib/&#039;&#039; - libraries of core Moodle code&lt;br /&gt;
:&#039;&#039;login/&#039;&#039; - code to handle login and account creation&lt;br /&gt;
:&#039;&#039;mod/&#039;&#039; - all the main Moodle course modules are in here&lt;br /&gt;
:&#039;&#039;pix/&#039;&#039; - generic site graphics&lt;br /&gt;
:&#039;&#039;theme/&#039;&#039; - theme packs/skins to change the look of the site.&lt;br /&gt;
:&#039;&#039;user/&#039;&#039; - code to display and manage users&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Setting-up your system==&lt;br /&gt;
To ensure that Moodle will install successfully, you need to check that the web server settings are correct, then create a blank database for Moodle to use and finally create a directory on your hard disk for Moodle to save your materials and other files you upload into your courses.&lt;br /&gt;
&lt;br /&gt;
=== Check web server settings ===&lt;br /&gt;
&lt;br /&gt;
*Firstly, make sure that your web server is set up to use index.php as a default page (perhaps in addition to index.html, default.htm and so on). In Apache, this is done using a DirectoryIndex parameter in your httpd.conf file. Mine usually looks like this:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;DirectoryIndex&#039;&#039;&#039; index.php index.html index.htm&lt;br /&gt;
&lt;br /&gt;
:Just make sure index.php is in the list (and preferably towards the start of the list, for efficiency).&lt;br /&gt;
&lt;br /&gt;
*Secondly, &#039;&#039;&#039;if you are using Apache 2&#039;&#039;&#039;, then you should turn on the &#039;&#039;AcceptPathInfo&#039;&#039; variable, which allows scripts to be passed arguments like &amp;lt;nowiki&amp;gt;http://server/file.php/arg1/arg2&amp;lt;/nowiki&amp;gt;. This is essential to allow relative links between your resources, and also provides a performance boost for people using your Moodle web site. You can turn this on by adding these lines to your httpd.conf file. (NB: This setting, or any equivalent, is not required in Apache 1)&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
=== Recheck PHP settings ===&lt;br /&gt;
Moodle requires a number of PHP settings to be active for it to work. These were given in the Requirements section and &#039;&#039;&#039;On most servers these will already be the default settings&#039;&#039;&#039;.  However, some PHP servers (and some of the more recent PHP versions) may have things set differently, so it is useful to double-check that the settings are correct. These are defined in PHP&#039;s configuration file (usually called &#039;&#039;&#039;php.ini&#039;&#039;&#039;) or in the Apache &#039;&#039;&#039;.htaccess&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
 safe_mode = 0 (necessary)&lt;br /&gt;
 memory_limit = 40M (varies: minimum 16M, 32M Moodle v1.7, 40M Moodle v1.8, 128M large sites)&lt;br /&gt;
 session.save_handler = files (unless you are using another handler, e.g. mm)   &lt;br /&gt;
 magic_quotes_gpc = 1    (preferred but not necessary, 0 will be recommended in 2.0)&lt;br /&gt;
 magic_quotes_runtime = 0    (necessary)&lt;br /&gt;
 file_uploads = 1&lt;br /&gt;
 session.auto_start = 0&lt;br /&gt;
 session.bug_compat_warn = 0&lt;br /&gt;
&lt;br /&gt;
You may also want to set other, optional php.ini file settings while you are already editing it. For instance, you may want to reset the maximum upload size of file attachments, which usually defaults to 2M(egabytes). For instance, to set these to 16 Megabytes:&lt;br /&gt;
 &lt;br /&gt;
 post_max_size = 16M&lt;br /&gt;
 upload_max_filesize = 16M&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Using a .htaccess file for webserver and PHP settings ===&lt;br /&gt;
&lt;br /&gt;
Use the above if you can directly edit your server&#039;s files, but if you are setting-up Moodle on a webhost, or don&#039;t have access to &#039;&#039;&#039;httpd.conf&#039;&#039;&#039; or &#039;&#039;&#039;php.ini&#039;&#039;&#039; on your server, or you have Moodle on a server with other applications that require different settings, then don&#039;t worry, you can often still override the default settings. This only works on Apache servers and only when Overrides have been allowed in the main Apache configuration. Moodle is supplied with a htaccess file which you can use, or you can create your own file manually.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Use the default htaccess file&#039;&#039;&#039;. The easiest thing to do is just copy the sample file from moodle/lib/htaccess and edit it to suit your needs. It contains further instructions. For example, in a Unix shell:&lt;br /&gt;
&lt;br /&gt;
 cd moodle&lt;br /&gt;
 cp moodle/lib/htaccess .htaccess&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Create your own file&#039;&#039;&#039;. Alternatively you can create your own file called &#039;&#039;&#039;.htaccess&#039;&#039;&#039; in Moodle&#039;s main directory that contains lines like the following. &lt;br /&gt;
&lt;br /&gt;
 DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 php_value memory_limit 40M (adjust to your version of Moodle)&lt;br /&gt;
 php_flag magic_quotes_gpc 1&lt;br /&gt;
 php_flag magic_quotes_runtime 0&lt;br /&gt;
 php_flag file_uploads 1&lt;br /&gt;
 php_flag session.auto_start 0&lt;br /&gt;
 php_flag session.bug_compat_warn 0&lt;br /&gt;
&lt;br /&gt;
:If you have Apache version 2 installed, add these lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;IfDefine APACHE2&amp;gt;&lt;br /&gt;
     AcceptPathInfo on&lt;br /&gt;
 &amp;lt;/IfDefine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Otherwise add this single line:&lt;br /&gt;
&lt;br /&gt;
 AcceptPathInfo on&lt;br /&gt;
&lt;br /&gt;
:Optionally, you can also do things like define the maximum size for uploaded files, etc by adding these lines:&lt;br /&gt;
&lt;br /&gt;
 LimitRequestBody 0&lt;br /&gt;
 php_value upload_max_filesize 2M&lt;br /&gt;
 php_value post_max_size 2M&lt;br /&gt;
&lt;br /&gt;
:The value given in these lines is 2M. You may want to change this at a later date to allow uploading of larger files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
Several hosting services that uses Apache 2 and php 5.x does not allow php flags and values to be set from within .htaccess file. It may be necessary to place a php.ini file within each sub-directory of the site :-( .&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Make one php.ini file in the main moodle directory tree and later copy it to all sub-directories. the syntax is a little bit different than the one used in .htaccess. (see sample after section 2)&lt;br /&gt;
# Run the script http://tips-scripts.com/php_ini_copy or copy php.ini manually to all sub-directories.&lt;br /&gt;
:php.ini (sample):&lt;br /&gt;
 upload_max_filesize = 2M&lt;br /&gt;
 post_max_size = 2M&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Some shared hosts use suPHP, which requires a slightly different configuration&#039;&#039;&#039;. If everything else fails, try creating the following two files and uploading to your moodle root directory&lt;br /&gt;
:php.ini (sample):&lt;br /&gt;
 register_globals = 0&lt;br /&gt;
 display_errors = 0&lt;br /&gt;
&lt;br /&gt;
:.htaccess (sample):&lt;br /&gt;
 suPHP_ConfigPath /home/cPanelName/public_html/moodle&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Change the above path to the actual path to your moodle install&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Before you go into this adventure make sure you really need those php instructions in your site.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note&#039;&#039;&#039;: Use a .htaccess file only [http://httpd.apache.org/docs/1.3/howto/htaccess.html#when as a last resort] as it can have an impact on the performance of your Moodle site and cause pages to load slowly on your browser.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating an empty database ===&lt;br /&gt;
&lt;br /&gt;
You need to create an empty database (eg &amp;quot;&#039;&#039;moodle&#039;&#039;&amp;quot;) in your database system along with a special user (eg &amp;quot;moodleuser&amp;quot;) that has access to that database (and that database only). You could use the &amp;quot;root&amp;quot; user if you wanted to for a test server, but this is not recommended for a production system: if hackers manage to discover the password then your whole database system would be at risk, rather than just one database.&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;Warning&#039;&#039;&#039;: Bear in mind that, as of Moodle version 1.5.x, Moodle doesn&#039;t work with MySQL 5.x&#039;s strict mode setting (STRICT_TRANS_TABLES and/or STRICT_ALL_TABLES) -- see [http://moodle.org/mod/forum/discuss.php?d=58552 forum discussion]. So if you are using MySQL 5.x, edit MySQL&#039;s configuration file (called &amp;quot;my.ini&amp;quot; in Windows and &amp;quot;my.cnf&amp;quot; on Unix/Linux) and comment out that option or set it to &amp;lt;code&amp;gt;sql-mode=&#039;&#039;&amp;lt;/code&amp;gt;. You have to restart MySQL after changing this setting. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; If you do not have access to your server, use PHPMyAdmin (or another MySQL client) and enter the command &amp;lt;code&amp;gt;SET @@global.sql_mode=&#039;&#039;;&amp;lt;/code&amp;gt; (be sure to use single quotes, and don&#039;t forget the semicolon).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
====Using a hosted server====&lt;br /&gt;
If you are using a webhost, they will probably have a control panel web interface for you to create your database.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;[http://www.cpanel.com/ cPanel]&#039;&#039;&#039; system is one of the most popular of these. &lt;br /&gt;
To create a database using cPanel:&lt;br /&gt;
&lt;br /&gt;
# Click on the &#039;&#039;&#039;MySQL Databases&#039;&#039;&#039; icon.&lt;br /&gt;
# Type &#039;&#039;&#039;moodle&#039;&#039;&#039; in the New Database field and click &#039;&#039;&#039;Create Database&#039;&#039;&#039;.&lt;br /&gt;
# Type a &#039;&#039;username&#039;&#039; and &#039;&#039;password&#039;&#039; (not one you use elsewhere) in the respective fields and click &#039;&#039;&#039;Create  User&#039;&#039;&#039;.&amp;lt;br&amp;gt;Note that the &#039;&#039;username&#039;&#039; and &#039;&#039;database&#039;&#039; names may be prefixed by your cPanel account name and an underscore, and truncated to 16 characters. When entering this information into the Moodle installer - use the full names.&lt;br /&gt;
# Now use the &#039;&#039;&#039;Add Users to Databases&#039;&#039;&#039; button and give this new user account &#039;&#039;&#039;ALL&#039;&#039;&#039; rights to the new database.&lt;br /&gt;
&lt;br /&gt;
Continue with [[Installing_Moodle#CreatDataDir |Creating the data directory]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
====Using a SQLite database====&lt;br /&gt;
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.&lt;br /&gt;
&lt;br /&gt;
Moodle 2.0 offers support for SQLite3 database installations. In this case, no database setup is required. The database file will be created by the installation script. By default, the database file will be store in Moodle&#039;s data directory (see [[Installing_Moodle#CreatDataDir |Creating the data directory]]). During install, the web server must have write access on the directory where the database file will be stored. After installation, the web server must have read-write access to the database file.&lt;br /&gt;
&lt;br /&gt;
Continue with [[Installing_Moodle#CreatDataDir |Creating the data directory]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Using the command line====&lt;br /&gt;
&lt;br /&gt;
If you have access to Unix or Windows command lines then you can do the same sort of thing by typing commands. You should do this using the MySQL Client program as follows (commands which you type-in are shown in bold):&lt;br /&gt;
&lt;br /&gt;
- Start the MySQL Client program:&lt;br /&gt;
 #&#039;&#039;&#039;mysql -u root -p&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 2 to server version: 5.0.22-log&lt;br /&gt;
 &lt;br /&gt;
 Type &#039;help;&#039; or &#039;\h&#039; for help. Type &#039;\c&#039; to clear the buffer.&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- The prompt changes to &amp;quot;mysql&amp;gt;&amp;quot; to indicate that you are now working in the MySQL Client program. When working in MySQL, all commands which you type-in must end in a semi-colon. (If you hit the Enter key without the final semi-colon, you&#039;ll get the line continuation symbol &#039;-&amp;gt;&#039;; this is your second chance to type the semi-colon and hit Enter.) &lt;br /&gt;
&lt;br /&gt;
- Begin by checking for any existing databases called &amp;quot;moodle&amp;quot; - if there are any you should change the name in all the commands which follow:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;SHOW DATABASES;&#039;&#039;&#039;&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | Database                |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | information_schema      |&lt;br /&gt;
 | mysql                   |&lt;br /&gt;
 | test                    |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 3 rows in set (0.03 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a database to store the Moodle tables. We&#039;ll call this &amp;quot;moodle&amp;quot;, as there are none with that name already in the above list, but change it if you need to.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;CREATE DATABASE moodle;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Change the default character set and collation of the &amp;quot;moodle&amp;quot; database to UTF8. Leave this out if you are installing Moodle 1.5 or earlier):&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a username and password to access the database &amp;quot;moodle&amp;quot; and grant database access permissions. We&#039;ll call the user &amp;quot;moodleuser&amp;quot; and set the password as &amp;quot;yourpassword&amp;quot;. It&#039;s a good idea to change these for your installation however most people keep the username as &amp;quot;moodleuser&amp;quot;. Remember the username and password you have set, as you&#039;ll need it in the configuration screens later. This is a long command so has been split over several lines by pressing the Return key.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;DROP,INDEX,ALTER ON moodle.*&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;TO moodleuser@localhost IDENTIFIED BY &#039;yourpassword&#039;;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Security Warnings&#039;&#039;&#039;: Never leave the password as the one shown here. Make sure you have a strong password (a mixture of letters and numbers, upper and lower case). Avoid granting &amp;quot;ALL&amp;quot; permissions on the database.&lt;br /&gt;
: &#039;&#039;&#039;Note&#039;&#039;&#039;: For MySQL 4.0.1 or earlier, you don&#039;t need the CREATE TEMPORARY TABLES permission. &lt;br /&gt;
&lt;br /&gt;
- Exit the MySQL Client program:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;QUIT&#039;&#039;&#039;&lt;br /&gt;
 Bye&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
- Reload the grant tables using the mysqladmin program:&lt;br /&gt;
 #&#039;&#039;&#039;mysqladmin -u root -p reload&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
And some example command lines for PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
   # su - postgres&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create user moodleuser createdb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create database moodle &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;with encoding &#039;unicode&#039;&amp;lt;/font&amp;gt;;&amp;quot; -U moodleuser template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser nocreatedb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser with encrypted password &#039;yourpassword&#039;;&amp;quot; template1&lt;br /&gt;
   &amp;gt; su - root&lt;br /&gt;
   # /etc/init.d/postgresql reload&lt;br /&gt;
&lt;br /&gt;
If the Postgres create database command above (&amp;gt;psql -c &amp;quot;create database moodle...&amp;quot;) gives an error message you may want to try:&lt;br /&gt;
 psql -c &amp;quot;create database moodle with template=template1 encoding = &#039;unicode&#039; owner =  moodleuser &amp;lt;br&amp;gt;     location = &#039;/var/mydata&#039;;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If the create database command asks you for a password, run the line containing &#039;encrypted password&#039; first before proceeding.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
* Step-by-step instructions on  [https://docs.moodle.org/en/Step-by-step_Install_Guide_for_Ubuntu installation for Ubuntu(Debian)]&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the data directory  ===&lt;br /&gt;
&lt;br /&gt;
Moodle will also need some space on your server&#039;s hard disk to store uploaded files, such as course documents and user pictures. The Moodle installer tries hard to create the &#039;&#039;&#039;moodledata&#039;&#039;&#039; directory for you but if it fails then you will have to create a directory for this purpose manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Security warning&#039;&#039;&#039;: For security purposes, it is &#039;&#039;&#039;CRITICAL&#039;&#039;&#039; that this directory is &#039;&#039;&#039;NOT&#039;&#039;&#039; accessible directly via the web. The easiest way to do this is to simply locate it OUTSIDE the web site root directory (it is the folder that the main part of your URL -that is, the part up to the first single / - points to; for example, in &amp;lt;nowiki&amp;gt;http://your.domain.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;, it is &amp;lt;nowiki&amp;gt;http://your.domain.com/&amp;lt;/nowiki&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
But if you must have it in the web directory (and you are using Apache AND the web server configuration allows .htaccess files to restrict access to directories) then protect it by creating a file in the data directory called &#039;&#039;&#039;.htaccess&#039;&#039;&#039;, containing these lines:&lt;br /&gt;
&lt;br /&gt;
 order deny,allow&lt;br /&gt;
 deny from all&lt;br /&gt;
&lt;br /&gt;
If you are using IIS, you need to edit the properties of the data directory (from the Internet Information Services Manager console) and deny access to that folder to everybody from the web.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you don&#039;t protect the data directory from direct web access, anybody will be able to impersonate any user of your Moodle site (including the admin user!!!), and all of your course materials will be available to the web at large.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ownership &amp;amp; Permissions&#039;&#039;&#039;: To make sure that Moodle can save uploaded files in this directory, check that the web server software has permission to read, write and execute in this directory. On Unix machines, this means setting the owner of the directory to be something like &amp;quot;nobody&amp;quot; or &amp;quot;apache&amp;quot;, and then giving that user read, write and execute permissions. As an example, to change the owner to &amp;quot;nobody&amp;quot; you could use:&lt;br /&gt;
&lt;br /&gt;
 chown -R nobody:apache moodledata&lt;br /&gt;
&lt;br /&gt;
To change the permissions so that the owner has read,write and execute permissions, use something like this:&lt;br /&gt;
&lt;br /&gt;
 chmod -R 0770 moodledata&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: If you are receiving permission denied messages, try &#039;&#039;chmod -R 0770 moodledata&#039;&#039; and then adjust the settings so that they are more secure. A more secure setting is &#039;&#039;chmod -R 0750 moodledata&#039;&#039;. According to the comments in config-dist.php, &amp;quot;On hosting systems you might need to make sure that your group has no permissions at all while others have full permissions.&amp;quot; To do this you could use &#039;&#039;chmod -R 707 moodledata&#039;&#039;. See also the [[Security | security page]].&lt;br /&gt;
&lt;br /&gt;
Remember that by default moodle will issue a warning about moodle data directories created inside the web directory, but otherwise this directory can be located where you wish. You can later move or change the location of this directory, but if you do, be sure to edit the setting in the &#039;&#039;&#039;config.php&#039;&#039;&#039; file that sets this; e.g. if moodledata is under a directory called data, then it would look like this:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/data/moodledata&#039;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CPanel and webhosts&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
On cPanel systems you can use the &amp;quot;File Manager&amp;quot; to find the folder, click on it, then choose &amp;quot;Change Permissions&amp;quot;. On many shared hosting servers, you will probably need to restrict all file access to your &amp;quot;group&amp;quot; (to prevent other webhost customers from looking at or changing your files), but provide full read/write access to everyone else (which will allow the web server to access your files). Speak to your server administrator if you are having trouble setting this up securely. In particular it will not be possible to create a usable data directory on sites that use a PHP feature known as &amp;quot;&#039;&#039;&#039;Safe Mode&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Run the installer script to create config.php ==&lt;br /&gt;
&lt;br /&gt;
To run the installer script (install.php), just try to access your Moodle main URL using a web browser, or access &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourserver/install.php&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039; directly.&lt;br /&gt;
&lt;br /&gt;
(The Installer will try to set a session cookie. If you get a popup warning in your browser make sure you accept that cookie!)&lt;br /&gt;
&lt;br /&gt;
Moodle will detect that configuration is necessary and will lead you through some screens to help you create a new configuration file called &#039;&#039;&#039;config.php&#039;&#039;&#039;. At the end of the process Moodle will try and write the file into the right location, otherwise you can press a button to download it from the installer and then upload &#039;&#039;&#039;config.php&#039;&#039;&#039; into the main Moodle directory on the server.&lt;br /&gt;
&lt;br /&gt;
Along the way the installer will test your server environment and give you suggestions about how to fix any problems. For most common issues these suggestions should be sufficient, but if you get stuck, check in the Installation Forum for more help.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Go to the admin page to continue configuration ==&lt;br /&gt;
&lt;br /&gt;
Once the basic config.php has been correctly created in the previous step, trying to access the front page of your site will take you to the &amp;quot;admin&amp;quot; page for the rest of the configuration.&lt;br /&gt;
&lt;br /&gt;
The first time you access this admin page, you will be presented with a GPL &amp;quot;shrink wrap&amp;quot; agreement with which you must agree before you can continue with the setup.&lt;br /&gt;
&lt;br /&gt;
Now Moodle will start setting up your database and creating tables to store data. Firstly, the main database tables are created. You should see a number of SQL statements followed by status messages that look like this:&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE course (&lt;br /&gt;
    id int(10) unsigned NOT NULL auto_increment,&lt;br /&gt;
    category int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    password varchar(50) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    fullname varchar(254) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    shortname varchar(15) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    summary text NOT NULL,&lt;br /&gt;
    format tinyint(4) NOT NULL default &#039;1&#039;,&lt;br /&gt;
    teacher varchar(100) NOT NULL default &#039;Teacher&#039;,&lt;br /&gt;
    startdate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    enddate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    timemodified int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    PRIMARY KEY (id)&lt;br /&gt;
 ) TYPE=MyISAM;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;SUCCESS&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and so on, followed by: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Main databases set up successfully.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see these, then there must have been some problem with the database or the configuration settings you defined in config.php. Check that PHP isn&#039;t in a restricted &amp;quot;Safe Mode&amp;quot; (commercial web hosts sometimes have safe mode turned on). You can check PHP variables by creating a little file containing &#039;&#039;&#039;&amp;lt;?php phpinfo() ?&amp;gt;&#039;&#039;&#039; and looking at it through a browser. Check all these and try this page again.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
You should now see a form where you can define more configuration variables for your installation, such as the default language, SMTP hosts and so on. Don&#039;t worry too much about getting everything right just now - you can always come back and edit these later on using the admin interface. The defaults are designed to be useful and secure for most sites. Scroll down to the bottom and click &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If (and only if) you find yourself getting stuck on this page, unable to continue, then your server probably has what I call the &amp;quot;buggy referrer&amp;quot; problem. This is easy to fix: just turn off the &amp;quot;secureforms&amp;quot; setting, then try to continue again.&lt;br /&gt;
&lt;br /&gt;
Next you will see more pages that print lots of status messages as they set up all the tables required by the various Moodle module. As before, they should all be &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;green&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
The next page is a form where you can define parameters for your Moodle site and the front page, such as the name, format, description and so on. Fill this out (you can always come back and change these later) and then press &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Finally, you will then be asked to create a top-level administration user for future access to the admin pages. Fill out the details with your own name, email etc and then click &amp;quot;Save changes&amp;quot;. Not all the fields are required, but if you miss any important fields you&#039;ll be re-prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you remember the username and password you chose for the administration user account, as they will be necessary to access the administration page in future.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(If for any reason your install is interrupted, or there is a system error of some kind that prevents you from logging in using the admin account, you can usually log in using the default username of &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;, with password &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
Once successful, you will be returned to the home page of your new site! Note the administration links that appear down the left hand side of the page (these items also appear on a separate Admin page) - these items are only visible to you because you are logged in as the admin user. All your further administration of Moodle can now be done using this menu, such as:&lt;br /&gt;
&lt;br /&gt;
* creating and deleting courses&lt;br /&gt;
* creating and editing user accounts&lt;br /&gt;
* administering teacher accounts&lt;br /&gt;
* changing site-wide settings like themes etc&lt;br /&gt;
&lt;br /&gt;
But you are not done installing yet! There is one very important thing still to do (see the next section on cron).&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Installing Moodle Using Command Line ==&lt;br /&gt;
&lt;br /&gt;
Installing Moodle Using command line is just as easy as installing Moodle using web browser. &lt;br /&gt;
* First Go to the moodle root directory and then to admin directory inside the moodle root. &lt;br /&gt;
&lt;br /&gt;
 $cd /var/www/html/moodle/admin&lt;br /&gt;
&lt;br /&gt;
* Then simply use the following syntax to run the moodle command line installer&lt;br /&gt;
 $php cliupgrade.php --lang=en --webaddr=http://www.example.com --moodledir=/var/www/html/moodle --datadir=/var/moodledata --dbtype=mysql --dbhost=localhost --dbname=moodle --dbuser=root --prefix=mdl --verbose=1 --interactivelevel=2 &lt;br /&gt;
&lt;br /&gt;
More information about the options can be found using &lt;br /&gt;
$php cliupgrad.php --help&lt;br /&gt;
&lt;br /&gt;
Then you will see the following list of available options&lt;br /&gt;
&lt;br /&gt;
 --lang		 		Valid installed language for installation. Default is English(en)&lt;br /&gt;
 --webaddr			Web address for the Moodle site&lt;br /&gt;
 --moodledir			Location of the moodle web folder&lt;br /&gt;
 --datadir			Location of the moodle data folder (should not be web visible)&lt;br /&gt;
 --dbtype			Database type. Default it mysql&lt;br /&gt;
 --dbhost			Database host. Default localhost&lt;br /&gt;
 --dbname			Database name. Default is moodle&lt;br /&gt;
 --dbuser			Database user. Default is blank&lt;br /&gt;
 --dbpass			Database password. Default is blank&lt;br /&gt;
 --prefix			        Table prefix for above database tables. Default is mdl&lt;br /&gt;
 --verbose			0 No output, 1 Summarized output(Default), 2 Detailed output&lt;br /&gt;
 --interactivelevel	        0 Non interactive, 1 Semi interactive(Default), 2 Interactive&lt;br /&gt;
 --help				print out this help&lt;br /&gt;
&lt;br /&gt;
When you choose non interactive mode without any options all the default values are assumed.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Set up cron ==&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s background tasks (e.g. sending out forum emails and performing course backups) are performed by a script which you can set to execute at specific times of the day. This is known as a cron script. Please refer to the [[Cron|Cron instructions]].&lt;br /&gt;
&lt;br /&gt;
== Set up backups ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[Backup settings| backup instructions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Create a new course ==&lt;br /&gt;
&lt;br /&gt;
Now that Moodle is running properly, you can try creating a new course to play with.&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Create a new course&amp;quot; from the Admin page (or the admin links on the home page).&lt;br /&gt;
&lt;br /&gt;
Fill out the form, paying special attention to the course format. You don&#039;t have to worry about the details too much at this stage, as everything can be changed later by the teacher. Note that the yellow help icons are everywhere to provide contextual help on any aspect.&lt;br /&gt;
&lt;br /&gt;
Press &amp;quot;Save changes&amp;quot;, and you will be taken to a new form where you can assign teachers to the course. You can only add existing user accounts from this form - if you want to create a new teacher account then either ask the teacher to create one for themselves (see the login page), or create one for them using the &amp;quot;Add a new user&amp;quot; on the Admin page.&lt;br /&gt;
&lt;br /&gt;
Once done, the course is ready to customize, and is accessible via the &amp;quot;Courses&amp;quot; link on the home page.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Installation FAQ]]&lt;br /&gt;
* [[Complete install packages]] might be an easier first time installs on some systems&lt;br /&gt;
* Help forum:  [http://moodle.org/mod/forum/view.php?id=28 Installation problems]&lt;br /&gt;
* [[Installing Apache, MySQL and PHP]] - Open source programs that can run Moodle on the web or on a desktop&lt;br /&gt;
* [[Upgrading Moodle]]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=42688 Selecting a web host for Moodle] forum discussion&lt;br /&gt;
* [[masquerading|Masquerading]] - Running Moodle behind a masquerading/NAT firewall&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[cs:Instalace]]&lt;br /&gt;
[[de:Installieren von Moodle]]&lt;br /&gt;
[[es:Instalación de moodle]]&lt;br /&gt;
[[fr:Installation de Moodle]]&lt;br /&gt;
[[ja:Moodleのインストール]]&lt;br /&gt;
[[nl:Installatiegids]]&lt;br /&gt;
[[pl:Instalacja Moodle]]&lt;br /&gt;
[[pt:Instalação do Moodle]]&lt;br /&gt;
[[ru:Установка Moodle]]&lt;br /&gt;
[[sk:Inštalácia]]&lt;br /&gt;
[[zh:安装Moodlezh:]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=UTF-8_PostgreSQL&amp;diff=42214</id>
		<title>UTF-8 PostgreSQL</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=UTF-8_PostgreSQL&amp;diff=42214"/>
		<updated>2008-08-17T01:19:35Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* PostgreSQL UTF8 Migration How-to */  grammatical fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UTF-8 migration]] &amp;gt; [[UTF-8 DB|Database conversion]] &amp;gt; PostgreSQL notes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This page is under construction!!&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==PostgreSQL UTF8 Migration How-to==&lt;br /&gt;
&lt;br /&gt;
This is a guide on how to migrate your Moodle installation PostgeSQL database to UTF8.&lt;br /&gt;
&lt;br /&gt;
All the data in the existing database must be translated to valid UTF8 characters. As PostgreSQL does not allow you to change the database encoding of an existing database, you need to create a new database with encoding UNICODE (PostgreSQL 7.x) or UTF8 (PostgreSQL 8.x). If you are already using a database with UNICODE/UTF8 encoding, the migration will process the data and save back to your existing database.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This process requires a *nix operating system, like any linux distribution or MacOSX. It will not work on a Windows version of PostgreSQL as Windows does not have the command line tools &amp;quot;grep&amp;quot; and &amp;quot;iconv&amp;quot;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Migration Procedure===&lt;br /&gt;
&lt;br /&gt;
# Create a new database with encoding UNICODE or UTF8 if you are not using one.&lt;br /&gt;
# Go to the admin panel and click on the migration link.&lt;br /&gt;
# The script will check for the settings required to commence the migration.&lt;br /&gt;
# If your current database is not in UNICODE/UTF8, the script will require you to provide the connection parameters of the UTF8 database.&amp;lt;br&amp;gt;&#039;&#039;&#039;NOTE:&#039;&#039;&#039; You might notice that there is an extra option called &amp;quot;PostgreSQL Cluster&amp;quot;. This is intended to pass the &amp;quot;--cluster&amp;quot; parameter to the PostgreSQL command line tools while copying the database. If you do not have more than one PostgreSQL server installed on the system or you have no idea about it, just leave it empty.&lt;br /&gt;
# Start the process following the instructions.&amp;lt;br&amp;gt;&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you happen to get any errors in the data copying process, you might want to do that manually. To do it manually please follow the instructions below this section.&lt;br /&gt;
# After the process finishes, modify your config.php to point to the new UTF8 database.&lt;br /&gt;
&lt;br /&gt;
===Manually Copy your current database to the new UNICODE database===&lt;br /&gt;
&lt;br /&gt;
# Make a plain text dump of your current db.&amp;lt;br&amp;gt;Run command:&amp;lt;pre&amp;gt;PGCLIENTENCODING=&#039;UNICODE&#039; PGDATABASE={dbname} pg_dump -Fp -O -x -U {dbuser} &amp;gt; tempfile1&amp;lt;/pre&amp;gt;Replace {dbname} and {dbuser} with your own values for your old non-unicode database. Supply --cluster, -h, -p to pg_dump if necessary.&lt;br /&gt;
# Strip out &amp;quot;COMMENT ON SCHEMA&amp;quot; statement, which would cause an error while importing with a non-root user.&amp;lt;br&amp;gt;Run command:&amp;lt;pre&amp;gt;grep -v &amp;quot;COMMENT ON SCHEMA&amp;quot; &amp;lt; tempfile1 &amp;gt; tempfile2&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Strip out any non-unicode characters with iconv&amp;lt;br&amp;gt;Run command:&amp;lt;pre&amp;gt;iconv -f UTF-8 -t UTF-8 -c &amp;lt; tempfile2 &amp;gt; tempfile3&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Import the data to your new unicode database&amp;lt;br&amp;gt;Run command:&amp;lt;pre&amp;gt;PGDATABASE={dbname} psql -q -U {dbuser} -v ON_ERROR_STOP=1 &amp;lt; tempfile3&amp;lt;/pre&amp;gt;Replace {dbname} and {dbuser} with your own values for your new unicode database. Supply --cluster, -h, -p to psql if necessary. The ON_ERROR_STOP=1 parameter will make psql stop immediately upon any errors.&lt;br /&gt;
&lt;br /&gt;
Now you have your unicode database with all your old data. Run the migration script again to finish the migration. &#039;&#039;&#039;NOTE: Please do not think the UTF8 migration is done at this stage. The migration script in Moodle should be executed to finish the process. Also please do not change your config.php to the new database until Moodle tells you to.&#039;&#039;&#039; The script is clever enough not to copy the data again if you have already done so.&lt;br /&gt;
&lt;br /&gt;
===Extra notes about errors that could happen during the copy process===&lt;br /&gt;
&lt;br /&gt;
If you get errors during the import process above about your current user not having permission to do something, this section is here to help.&lt;br /&gt;
&lt;br /&gt;
It is reported that if you have installed some procedure language on your postgres server, the import process will fail if you are not using the superuser account. This is because pg_dump dumps everything in your previous database including any language definitions. If you have enabled language support, your tempfile1 file will contain this info, so the database you created will probably contain it, too. To restore language definitions you need the superuser account.&lt;br /&gt;
&lt;br /&gt;
To avoid this error, open the tempfile3 file in step 3 above using any text editor (note the file could be a few to several hundred MBs). From the top of the file, remove SQL statements like &#039;&#039;&#039;CREATE PROCEDURAL LANGUAGE&#039;&#039;&#039;, &#039;&#039;&#039;CREATE FUNCTION&#039;&#039;&#039;, &#039;&#039;&#039;ALTER FUNCTION&#039;&#039;&#039;, &#039;&#039;&#039;COMMENT ON SCHEMA&#039;&#039;&#039;. Do not remove any &#039;&#039;&#039;SET&#039;&#039;&#039; statements unless they become blockers. Search through the entire file for them. They usually exist at the top of the file before any &#039;&#039;&#039;CREATE TABLE&#039;&#039;&#039; statements.&lt;br /&gt;
&lt;br /&gt;
After cleaning up the file, continue on to step 4 as described above. Should any errors occur again, hunt for them in tempfile3.&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:UTF-8|Database]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Installing_Moodle&amp;diff=42021</id>
		<title>Talk:Installing Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Installing_Moodle&amp;diff=42021"/>
		<updated>2008-08-14T01:22:31Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: New section: New Installing from Command Line section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Additional requirements==&lt;br /&gt;
&lt;br /&gt;
Should the installation page mention some of the more detailed PHP requirements also, like GD library and the FreeType 2 library on Linux/Unix boxes to be able to look at the dynamic graphs that the logs pages make? [[User:SamuliK|SamuliK]] 13 January 2006 11:10 (WST)&lt;br /&gt;
&lt;br /&gt;
:Yes, good idea - please contribute :-) [[User:Helen|Helen]] 13 January 2006 11:35 (WST)&lt;br /&gt;
&lt;br /&gt;
Please add to the &amp;quot;Requirements&amp;quot; section of the Installation Instructions something such as:&lt;br /&gt;
&lt;br /&gt;
During Installation of Moodle the PHP Memory Limit should be set to 16M. Many commercial hosting providers have this set to 8M only. To find out your PHP Memory Limit use PHP Info. You may have to ask your service provider to increase the PHP Memory Limit before you can complete the installation.&lt;br /&gt;
&lt;br /&gt;
Thanks for your help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
maybe this could be a good place to mention something for BUG 4937 &amp;quot;some SCORM objects contain HTC files which are not automatically supported by APACHE, if you are using APACHE and make use of large numbers of SCORM objects then you may want to add the following MIME Type.... etc....&lt;br /&gt;
see here for details:&lt;br /&gt;
http://moodle.org/bugs/bug.php?op=show&amp;amp;bugid=4937&amp;amp;pos=24&lt;br /&gt;
--[[User:Dan Marsden|Dan Marsden]] 13:57, 8 June 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==confused about==&lt;br /&gt;
1) Reload the grant tables using the mysqladmin program:&lt;br /&gt;
 #mysqladmin -u root -p reload&lt;br /&gt;
 Enter password:&lt;br /&gt;
 &#039;requires reload priviledge&#039;&lt;br /&gt;
&lt;br /&gt;
2)And some example command lines for PostgreSQL:&lt;br /&gt;
   # su - postgres&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create user moodleuser createdb;&amp;quot; template1&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
What&#039;s the PostgreSQL about?&lt;br /&gt;
&lt;br /&gt;
[[User:Dennis German|Dennis German]] 20:13, 28 January 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
It&#039;s another database server you can use with Moodle instead of MySQL.&lt;br /&gt;
[[User:Richard Enison|Richard Enison]] 02:39, 6 August 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Some things I came across==&lt;br /&gt;
First-time user of Moodle, so I&#039;m commenting here rather than editing, just to be on the safe side :-) -- two things have caught my attention:&lt;br /&gt;
* &amp;quot;# mysqladmin -u root -p reload&amp;quot; -- this step is unnecessary. The reload command is only for when you fiddle directly with the mysql permission tables, but not needed when you do a GRANT.&lt;br /&gt;
* &amp;quot;Remember by default, mysql won&#039;t accept moodle data directories created under ROOT&amp;quot; -- not sure what is meant by this sentence? The data directory in question is for storing files, not db data, right?&lt;br /&gt;
--[[User:Carsten Pedersen|Carsten Pedersen]] 18:14, 27 January 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
Right. I think it means directories created and owned by the root (o/s) user.&lt;br /&gt;
--[[User:Richard Enison|Richard Enison]] 04:28, 23 November 2007 (CST)&lt;br /&gt;
But you&#039;ve got a point. I don&#039;t know what that has to do with mysql either. --[[User:Richard Enison|Richard Enison]] 02:42, 6 August 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Ref:PHP and MySQL==&lt;br /&gt;
Should there be special comment on the use of &amp;quot;--with-mysql&amp;quot; and &amp;quot;--with-mysqli&amp;quot; PHP configure options and outcomes (if any) for Moodle functions?&lt;br /&gt;
&lt;br /&gt;
--[[User:Paul Trudt|pd3244]] 13:12, 7 August 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
Re: &amp;quot;PHP Extensions and Libraries&amp;quot;:&lt;br /&gt;
Some guidance in how to enable or install those recommendations in the php.ini file would help me, so I imagine it would help others too. I&#039;m in the default php5 php.ini file right now, and it says,&lt;br /&gt;
&lt;br /&gt;
`[mbstring]&lt;br /&gt;
; language for internal character representation.&lt;br /&gt;
;mbstring.language = Japanese`&lt;br /&gt;
&lt;br /&gt;
--but I don&#039;t know what to do with that to make it what Moodle needs.&lt;br /&gt;
&lt;br /&gt;
Otherwise, smooth sailing so far. :)&lt;br /&gt;
--[[User:Clay Burell|Clay Burell]] 07:01, 28 July 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==  Structure of moodle directory ==&lt;br /&gt;
&lt;br /&gt;
Hi there,&lt;br /&gt;
&lt;br /&gt;
I&#039;m also new, so I try this way rather than editing directly. The &amp;quot;Structure of moodle directory&amp;quot; lists the directory &amp;quot;doc&amp;quot; which didn&#039;t come with the current 1.7.1+ version I downloaded.&lt;br /&gt;
&lt;br /&gt;
[[User:Sandra Reitz|Sandra Reitz]] 04:17, 16 February 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
== Installing on Netware ==&lt;br /&gt;
&lt;br /&gt;
Under system requirements this page indicates that it is possible to install on Netware 6.5. The latest versions of PHP for Netware appear to be 4.2.3 and 5.0.5, while Moodle 1.8 requires 4.3.0 or 5.1.0. This means that Moodle is no longer supported on the Netware platfrom and the documentation should indicate this.&lt;br /&gt;
&lt;br /&gt;
- Looking at http://forge.novell.com/modules/xfcontent/downloads.php/php/GCC%20Built%20Daily%20Releases there appears to be a download for php 5.1 (built in 2006-02, so it&#039;s old). I don&#039;t have a novell install anymore, so please can you confirm this. --[[User:Ken Wilson|Ken Wilson]] 06:21, 7 May 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Using a .htaccess file for webserver and PHP settings ==&lt;br /&gt;
under the above section are .htaccess settings such as&lt;br /&gt;
&lt;br /&gt;
php_flag magic_quotes_gpc 1&lt;br /&gt;
&lt;br /&gt;
As I correct in saying these would not work if running php as a .cgi?  If so, it needs saying.&lt;br /&gt;
&lt;br /&gt;
:Regarding the &amp;quot;Run the Install&amp;quot; job section. At least in Windows installs, you need to edit the config.php-dist file (which has template specs for various file loscations) and insert all the information about your install - root directory, database name and credentials, and data directory location. Then you can run the Install.php job and step through the process.&lt;br /&gt;
&lt;br /&gt;
== Missing documentation for Multiple Servers Installation ==&lt;br /&gt;
I think that section [https://docs.moodle.org/en/Installing_Moodle#Creating_the_data_directory 5.5 creating the data directory]  should mention whether it is possible to define a folder which is located on a remote server.&lt;br /&gt;
&lt;br /&gt;
Is it possible? – I try to do that by mapping a drive on a Windows Server to another server. Will update you on the results.&lt;br /&gt;
&lt;br /&gt;
Also, I agree that the title of the section is misleading: Data directory implies Database. Files Directory or Uploads directory, are better options, to my humble opinion.&lt;br /&gt;
[[User:טל בודק|טל בודק]] 04:07, 1 June 2008 (CDT)&lt;br /&gt;
:I agree with you about the section name change. The Window&#039;s complete install packages call this folder by default Moodledata. I would suggest that be in the section name as well.   Maybe &amp;quot;Moodledata and uploaded files directories&amp;quot; would help the new user.  Old pros will get it right away :)--[[User:chris collman|chris collman]] 06:13, 11 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Missing documentation for pear ==&lt;br /&gt;
&lt;br /&gt;
Pear is included in Moodle /moodle/lib/pear/ but it not called directly.&lt;br /&gt;
&lt;br /&gt;
for e.g. in file /moodle/lib/formslib.php&lt;br /&gt;
&lt;br /&gt;
require_once &#039;HTML/QuickForm.php&#039;;&lt;br /&gt;
&lt;br /&gt;
For this to work either all these pear packages must be installed on server or /moodle/lib/pear/ should be included in php include_path.&lt;br /&gt;
&lt;br /&gt;
Should this be mentioned in documentation or developers might want to upgrade code in a way that will eliminate this problem.&lt;br /&gt;
&lt;br /&gt;
require_once $CFG-&amp;gt;libdir.&#039;pear/HTML/QuickForm.php&#039;; (Don&#039;t know how good or bad it may be)&lt;br /&gt;
&lt;br /&gt;
== New Installing from Command Line section ==&lt;br /&gt;
&lt;br /&gt;
What&#039;s the deal with the Installing Moodle from the Command Line section of this page? It was added August 3, 2008 and doesn&#039;t seem to apply to any version of Moodle from 1.8.3 to 1.9.2+. See [http://moodle.org/mod/forum/discuss.php?d=103314#p456274 this post].&lt;br /&gt;
--[[User:Richard Enison|Richard Enison]] 20:22, 13 August 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=41770</id>
		<title>Installing Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=41770"/>
		<updated>2008-08-09T20:48:15Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: updated notice about broken link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Firstly don&#039;t panic! :-)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This guide explains how to install Moodle for the first time. For some of these steps it goes into a lot of detail to try and cover the majority of possible web server setups, so this page may look long and complicated. Don&#039;t panic, once you know how to do it you can install Moodle in minutes!&lt;br /&gt;
&lt;br /&gt;
If you have problems please read this page carefully - most common issues are answered in here. If you still have trouble, you can seek help from the Moodle community via  [http://moodle.org/course/view.php?id=5 moodle.org Using Moodle].&lt;br /&gt;
&lt;br /&gt;
Another option is to contact a [http://moodle.com/hosting/ Moodle Partner providing Moodle hosting] who can completely maintain Moodle for you, so that you can ignore all this and get straight into educating! A Moodle partner is the preferred option but if you decide to choose a hosting company that has cpanel then [http://otaru-jc.ac.jp/hagley/settingupmoodleonhostingwithcpanel.swf this tutorial will guide you]  through the process of choosing a host and setting up moodle via cpanel (not currently available; links are expected to be updated in a few weeks; see [http://moodle.org/mod/forum/discuss.php?d=102472#p454083 this forum post]). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; some hosting companies offer one-click moodle install options, which whilst sometimes effective, usually use old (sometimes years old) versions of moodle and sometimes simply don&#039;t work. If one of these goes wrong, your best bet is often to start from scratch following the instructions here yourself. Its almost certainly quicker.&lt;br /&gt;
&lt;br /&gt;
If you want to run Moodle on your own computer and this page looks a bit daunting, then please see our guides on how to install one of Moodle&#039;s complete [[Complete install packages for Windows|Windows packages]], [[Complete Install Packages for Mac OS X|Mac OS packages]] or [[Installing AMP |Installing Apache, MySQL and PHP(AMP)]]. They provide alternative instructions to install all this on most popular platforms.&lt;br /&gt;
&lt;br /&gt;
==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
Moodle is primarily developed in Linux using [[Apache]], [[MySQL]] and [[PHP]] (also sometimes known as the LAMP platform), but is also regularly tested with Windows XP/2000/2003 (WAMP), Solaris 10 (Sparc and x64), Mac OS X and Netware 6 operating systems. Support for PostgreSQL, Oracle and Microsoft SQL Server is also available.&lt;br /&gt;
&lt;br /&gt;
The procedure for installing Moodle on the Windows platform (e.g. Windows Server, IIS and MSSQL) varies slightly to the procedure for the LAMP platform. See [[Installation for Windows 2003 with IIS]] for more details.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blank page problem while installing Moodle on Windows Vista may occur; following these steps: [[Installing Moodle on Windows Vista]] might help.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note if you are using a hosted account&#039;&#039;&#039;: Most web hosts support all of these requirements by default. You should contact your web host&#039;s support desk to check that this is the case &#039;&#039;&#039;before&#039;&#039;&#039; signing-up with them. It is especially important to ask about any PHP memory limits or MySQL question limits. If your prospective host does not provide a service which meets these requirements, or you are already signed up with them, ask them why and consider taking your business elsewhere if they do not change.&lt;br /&gt;
&lt;br /&gt;
The requirements for Moodle are as follows:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hardware&#039;&#039;&#039; (unless you are using a hosted server). &lt;br /&gt;
* Disk space: 160MB free (min). You will require more free space to store your teaching materials.&lt;br /&gt;
* Memory: 256MB (min), 1GB (recommended). The general rule of thumb is that Moodle can support 50 &#039;&#039;concurrent&#039;&#039; users for every 1GB of RAM, but this will vary depending on your specific hardware and software combination. &lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
* Web server software. Most people use [[Apache]], but Moodle should work fine under any web server that supports [[PHP]], such as [[IIS]] on Windows platforms. PHP does impose requirements on versions of web servers, however these are complex and the general advice is to use the newest version possible of your chosen web server. &lt;br /&gt;
* PHP scripting language. (Please note that there have been issues installing Moodle with [http://www.php-accelerator.co.uk PHP-Accelerator]). There are currently two versions (or branches) of PHP available: PHP4 and PHP5 and the version requirements are listed below.&lt;br /&gt;
** For Moodle version 1.4 or later: PHP4 (version 4.1.0 or later) or PHP5 (version 5.1.0 or later) are supported.&lt;br /&gt;
** For Moodle version 1.6 or later: the PHP4 (version 4.3.0 or later) or PHP5 (version 5.1.0 or later) are supported. &lt;br /&gt;
** Future Moodle versions 2.0 or later will not support PHP4 and will require PHP5 (version 5.2.0 or later).&lt;br /&gt;
** PHP Settings. Check these settings in your php.ini or .htaccess file (if you&#039;re using Apache). For settings which use ON/OFF as their values, you can substitute 1 for ON and 0 for OFF if you prefer. &lt;br /&gt;
*** &#039;&#039;safe_mode&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;memory_limit&#039;&#039; should be at least 16M (32M is recommended for Moodle 1.7 and 40M for Moodle 1.8 or later). Large sites may need more than 128M. PHP 5.2.x requires higher memory_limit values than previous versions of PHP. 64bit operating systems require even more memory.&lt;br /&gt;
*** &#039;&#039;session.save_handler&#039;&#039; needs to be set to FILES.&lt;br /&gt;
*** &#039;&#039;magic_quotes_gpc&#039;&#039; should be ON. (It will be recommended to turn it off in 2.0.)&lt;br /&gt;
*** &#039;&#039;magic_quotes_runtime&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;file_uploads&#039;&#039; needs to be ON.&lt;br /&gt;
*** &#039;&#039;session.auto_start&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;session.bug_compat_warn&#039;&#039; needs to be OFF.&lt;br /&gt;
** PHP Extensions and libraries&lt;br /&gt;
*** The mbstring extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** The iconv extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** [http://www.libgd.org/ GD library] and the [http://www.freetype.org/ FreeType 2] library and extensions are needed to be able to look at the dynamic graphs that the logs pages make.&lt;br /&gt;
*** The mysql extension is required if you are using the MySQL database. Note that in some Linux distributions (notably Red Hat) this is an optional installation.&lt;br /&gt;
*** The pgsql extension is required if you are using the PostgreSQL database.&lt;br /&gt;
*** The zlib extension is required for zip/unzip functionality.&lt;br /&gt;
*** The curl extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The tokenizer extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The curl and openssl extensions are required for the Moodle network functionality (Moodle 1.8 or later).&lt;br /&gt;
*** Other PHP extensions may be required to support optional Moodle functionality, especially external authentication and/or enrolment (e.g. LDAP extension for LDAP authentication and the sockets extension for Chat server).&lt;br /&gt;
* A working database server: [[MySQL]] or [[PostgreSQL]] are completely supported and recommended for use with any version of Moodle. Support for Microsoft SQL Server and Oracle has been added in Moodle 1.7. MySQL is &#039;&#039;the&#039;&#039; choice for many people because it is very popular, but there are some [[Arguments in favour of PostgreSQL|arguments in favour of PostgreSQL]], especially if you are planning a large deployment. &lt;br /&gt;
** For Moodle 1.5, MySQL (version 3.23 or later) or PostgreSQL (7.4 or later). &lt;br /&gt;
** For Moodle 1.6, MySQL (version 4.1.12 or later) or PostgreSQL (7.4 or later).&lt;br /&gt;
** For Moodle 1.7, MySQL (version 4.1.12 or later), PostgreSQL (7.4 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
** For Moodle 1.8 or later, MySQL (version 4.1.12 or later), PostgreSQL (8.0 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
: MySQL Notes: For Moodle 1.6 or later, If you use latin languages only you can use MySQL 4.1.12. If you are using non-latin languages you require MySQL 4.1.16 or later. Currently the MySQL setting &amp;quot;strict mode&amp;quot; must be OFF (set to &amp;quot;&amp;quot; or &amp;quot;MYSQL40&amp;quot;) in the MySQL configuration file. &lt;br /&gt;
: PostgreSQL Notes: PostgreSQL 7.4 is recommended for earlier Moodle versions, since Moodle 1.8 only PostgreSQL 8.0 and above are supported.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== How many users? ==&lt;br /&gt;
&lt;br /&gt;
In addition to the hardware and software requirements, you will also need to think about the capacity of your Moodle installation in terms of the number of users it can handle. There are two numbers to plan for:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Browsing users&#039;&#039;&#039;: the maximum number of users able to browse your Moodle site. This is the number of computers in your organization or on your course (whichever is greater).&lt;br /&gt;
* &#039;&#039;&#039;Concurrent database users&#039;&#039;&#039;: the maximum number of concurrent database users (needed for Moodle activities such as quizzes). This is the number of users who will be using Moodle at the same time. In an educational institution, use your timetable/roster to obtain this figure.&lt;br /&gt;
&lt;br /&gt;
Once you know these figures for your users, you can start work out if your Moodle installation can support this capacity. The exact number of users depends on your hardware/software/network combination. Usually the amount of memory installed (RAM) is the deciding factor but a faster overall processor speed will also help in reducing waiting times for pages to load. &lt;br /&gt;
&lt;br /&gt;
The general rule of thumb for a single server is that the approx max concurrent users = RAM (GB) * 50 and the approx max browsing users = Approx max concurrent users * 5. As an example, a university with 500 total computers on campus and 100 concurrent users at any time will need approx 2GB of RAM on the one server to support the number of concurrent users.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note if you are using a hosted account&#039;&#039;&#039;: Ask your provider what limits are placed on the number of concurrent database connections and the processor load. This will give a good estimate of the number of users your Moodle install can manage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; As of August 31, 2007, Moodle 1.8.2+ is not recommended for large installations, especially if you have large number (e.g. 20,000+) of courses. The main reason is the codes related to ROLES are still not fully optimized with database queries and still need some work. If you are planning to use 1.8.x codes for a larger institution, please make sure that you have sufficient time to do your own testing and performance profiling.  Upgrade to Moodle 1.9!!&lt;br /&gt;
&lt;br /&gt;
[Update] This performance issue has been improved quite a bit in the most recent 1.8.3+ version (see this thread discussion: http://moodle.org/mod/forum/discuss.php?d=83281).  Moodle 1.9 has even more improvements in all areas and is the recommended version.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Download and copy files into place ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to get Moodle, either as a compressed package or via CVS. &lt;br /&gt;
* There are two types of compressed packages on the  [http://download.moodle.org/ download page: http://download.moodle.org/], the standard distribution with Moodle only files and the [[Complete install packages|complete install]], which contains programs to operate Moodle in a web environment.  &lt;br /&gt;
* To use CVS, helpful instructions are available at the [[CVS_for_Administrators | CVS for Administrators]] page. The full [http://cvs.moodle.org/moodle/ Moodle CVS repository] is also available for browsing. &lt;br /&gt;
&lt;br /&gt;
After downloading, unpack the archive using either &lt;br /&gt;
 tar -zxvf [filename]&lt;br /&gt;
or&lt;br /&gt;
 unzip [filename]&lt;br /&gt;
as appropriate. &lt;br /&gt;
&lt;br /&gt;
If using CVS, run the CVS Checkout command.&lt;br /&gt;
&lt;br /&gt;
You will now be left with a directory called &amp;quot;moodle&amp;quot;, containing a number of files and folders.&lt;br /&gt;
&lt;br /&gt;
You can either place the whole folder in your web server documents directory, in which case the site will be located at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com/moodle&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;, or you can copy all the contents straight into the main web server documents directory, in which case the site will be simply &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you are downloading Moodle to your local computer and then uploading it to your web site, it is usually better to upload the whole archive as one file, and then do the unpacking on the server. Even web hosting interfaces like cPanel allow you to uncompress archives in the &amp;quot;File Manager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Structure of moodle directory ===&lt;br /&gt;
&lt;br /&gt;
You can safely skip this section, but here is a quick summary of the contents of the Moodle folder, to help get you oriented:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;config.php&#039;&#039; - contains basic settings. This file does not come with Moodle - you will create it.&lt;br /&gt;
:&#039;&#039;install.php&#039;&#039; - the script you will run to create config.php&lt;br /&gt;
:&#039;&#039;version.php&#039;&#039; - defines the current version of Moodle code&lt;br /&gt;
:&#039;&#039;index.php&#039;&#039; - the front page of the site&lt;br /&gt;
:&#039;&#039;admin/&#039;&#039; - code to administrate the whole server&lt;br /&gt;
:&#039;&#039;auth/&#039;&#039; - plugin modules to authenticate users&lt;br /&gt;
:&#039;&#039;blocks/&#039;&#039; - plugin modules for the little side blocks on many pages&lt;br /&gt;
:&#039;&#039;calendar/&#039;&#039; - all the code for managing and displaying calendars&lt;br /&gt;
:&#039;&#039;course/&#039;&#039; - code to display and manage courses&lt;br /&gt;
:&#039;&#039;doc/&#039;&#039; - help documentation for Moodle (eg this page)&lt;br /&gt;
:&#039;&#039;files/&#039;&#039; - code to display and manage uploaded files&lt;br /&gt;
:&#039;&#039;lang/&#039;&#039; - texts in different languages, one directory per language&lt;br /&gt;
:&#039;&#039;lib/&#039;&#039; - libraries of core Moodle code&lt;br /&gt;
:&#039;&#039;login/&#039;&#039; - code to handle login and account creation&lt;br /&gt;
:&#039;&#039;mod/&#039;&#039; - all the main Moodle course modules are in here&lt;br /&gt;
:&#039;&#039;pix/&#039;&#039; - generic site graphics&lt;br /&gt;
:&#039;&#039;theme/&#039;&#039; - theme packs/skins to change the look of the site.&lt;br /&gt;
:&#039;&#039;user/&#039;&#039; - code to display and manage users&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Setting-up your system==&lt;br /&gt;
To ensure that Moodle will install successfully, you need to check that the web server settings are correct, then create a blank database for Moodle to use and finally create a directory on your hard disk for Moodle to save your materials and other files you upload into your courses.&lt;br /&gt;
&lt;br /&gt;
=== Check web server settings ===&lt;br /&gt;
&lt;br /&gt;
*Firstly, make sure that your web server is set up to use index.php as a default page (perhaps in addition to index.html, default.htm and so on). In Apache, this is done using a DirectoryIndex parameter in your httpd.conf file. Mine usually looks like this:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;DirectoryIndex&#039;&#039;&#039; index.php index.html index.htm&lt;br /&gt;
&lt;br /&gt;
:Just make sure index.php is in the list (and preferably towards the start of the list, for efficiency).&lt;br /&gt;
&lt;br /&gt;
*Secondly, &#039;&#039;&#039;if you are using Apache 2&#039;&#039;&#039;, then you should turn on the &#039;&#039;AcceptPathInfo&#039;&#039; variable, which allows scripts to be passed arguments like &amp;lt;nowiki&amp;gt;http://server/file.php/arg1/arg2&amp;lt;/nowiki&amp;gt;. This is essential to allow relative links between your resources, and also provides a performance boost for people using your Moodle web site. You can turn this on by adding these lines to your httpd.conf file. (NB: This setting, or any equivalent, is not required in Apache 1)&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
=== Recheck PHP settings ===&lt;br /&gt;
Moodle requires a number of PHP settings to be active for it to work. These were given in the Requirements section and &#039;&#039;&#039;On most servers these will already be the default settings&#039;&#039;&#039;.  However, some PHP servers (and some of the more recent PHP versions) may have things set differently, so it is useful to double-check that the settings are correct. These are defined in PHP&#039;s configuration file (usually called &#039;&#039;&#039;php.ini&#039;&#039;&#039;) or in the Apache &#039;&#039;&#039;.htaccess&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
 safe_mode = 0 (necessary)&lt;br /&gt;
 memory_limit = 40M (varies: minimum 16M, 32M Moodle v1.7, 40M Moodle v1.8, 128M large sites)&lt;br /&gt;
 session.save_handler = files (unless you are using another handler, e.g. mm)   &lt;br /&gt;
 magic_quotes_gpc = 1    (preferred but not necessary, 0 will be recommended in 2.0)&lt;br /&gt;
 magic_quotes_runtime = 0    (necessary)&lt;br /&gt;
 file_uploads = 1&lt;br /&gt;
 session.auto_start = 0&lt;br /&gt;
 session.bug_compat_warn = 0&lt;br /&gt;
&lt;br /&gt;
You may also want to set other, optional php.ini file settings while you are already editing it. For instance, you may want to reset the maximum upload size of file attachments, which usually defaults to 2M(egabytes). For instance, to set these to 16 Megabytes:&lt;br /&gt;
 &lt;br /&gt;
 post_max_size = 16M&lt;br /&gt;
 upload_max_filesize = 16M&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Using a .htaccess file for webserver and PHP settings ===&lt;br /&gt;
&lt;br /&gt;
Use the above if you can directly edit your server&#039;s files, but if you are setting-up Moodle on a webhost, or don&#039;t have access to &#039;&#039;&#039;httpd.conf&#039;&#039;&#039; or &#039;&#039;&#039;php.ini&#039;&#039;&#039; on your server, or you have Moodle on a server with other applications that require different settings, then don&#039;t worry, you can often still override the default settings. This only works on Apache servers and only when Overrides have been allowed in the main Apache configuration. Moodle is supplied with a htaccess file which you can use, or you can create your own file manually.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Use the default htaccess file&#039;&#039;&#039;. The easiest thing to do is just copy the sample file from moodle/lib/htaccess and edit it to suit your needs. It contains further instructions. For example, in a Unix shell:&lt;br /&gt;
&lt;br /&gt;
 cd moodle&lt;br /&gt;
 cp moodle/lib/htaccess .htaccess&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Create your own file&#039;&#039;&#039;. Alternatively you can create your own file called &#039;&#039;&#039;.htaccess&#039;&#039;&#039; in Moodle&#039;s main directory that contains lines like the following. &lt;br /&gt;
&lt;br /&gt;
 DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 php_value memory_limit 40M (adjust to your version of Moodle)&lt;br /&gt;
 php_flag magic_quotes_gpc 1&lt;br /&gt;
 php_flag magic_quotes_runtime 0&lt;br /&gt;
 php_flag file_uploads 1&lt;br /&gt;
 php_flag session.auto_start 0&lt;br /&gt;
 php_flag session.bug_compat_warn 0&lt;br /&gt;
&lt;br /&gt;
:If you have Apache version 2 installed, add these lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;IfDefine APACHE2&amp;gt;&lt;br /&gt;
     AcceptPathInfo on&lt;br /&gt;
 &amp;lt;/IfDefine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Otherwise add this single line:&lt;br /&gt;
&lt;br /&gt;
 AcceptPathInfo on&lt;br /&gt;
&lt;br /&gt;
:Optionally, you can also do things like define the maximum size for uploaded files, etc by adding these lines:&lt;br /&gt;
&lt;br /&gt;
 LimitRequestBody 0&lt;br /&gt;
 php_value upload_max_filesize 2M&lt;br /&gt;
 php_value post_max_size 2M&lt;br /&gt;
&lt;br /&gt;
:The value given in these lines is 2M. You may want to change this at a later date to allow uploading of larger files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
Several hosting services that uses Apache 2 and php 5.x does not allow php flags and values to be set from within .htaccess file. It may be necessary to place a php.ini file within each sub-directory of the site :-( .&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Make one php.ini file in the main moodle directory tree and later copy it to all sub-directories. the syntax is a little bit different than the one used in .htaccess. (see sample after section 2)&lt;br /&gt;
# Run the script http://tips-scripts.com/php_ini_copy or copy php.ini manually to all sub-directories.&lt;br /&gt;
:php.ini (sample):&lt;br /&gt;
 upload_max_filesize = 2M&lt;br /&gt;
 post_max_size = 2M&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Before you go into this adventure make sure you really need those php instructions in your site.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note&#039;&#039;&#039;: Use a .htaccess file only [http://httpd.apache.org/docs/1.3/howto/htaccess.html#when as a last resort] as it can have an impact on the performance of your Moodle site and cause pages to load slowly on your browser.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating an empty database ===&lt;br /&gt;
&lt;br /&gt;
You need to create an empty database (eg &amp;quot;&#039;&#039;moodle&#039;&#039;&amp;quot;) in your database system along with a special user (eg &amp;quot;moodleuser&amp;quot;) that has access to that database (and that database only). You could use the &amp;quot;root&amp;quot; user if you wanted to for a test server, but this is not recommended for a production system: if hackers manage to discover the password then your whole database system would be at risk, rather than just one database.&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;Warning&#039;&#039;&#039;: Bear in mind that, as of Moodle version 1.5.x, Moodle doesn&#039;t work with MySQL 5.x&#039;s strict mode setting (STRICT_TRANS_TABLES and/or STRICT_ALL_TABLES) -- see [http://moodle.org/mod/forum/discuss.php?d=58552 forum discussion]. So if you are using MySQL 5.x, edit MySQL&#039;s configuration file (called &amp;quot;my.ini&amp;quot; in Windows and &amp;quot;my.cnf&amp;quot; on Unix/Linux) and comment out that option or set it to &amp;lt;code&amp;gt;sql-mode=&#039;&#039;&amp;lt;/code&amp;gt;. You have to restart MySQL after changing this setting. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; If you do not have access to your server, use PHPMyAdmin (or another MySQL client) and enter the command &amp;lt;code&amp;gt;SET @@global.sql_mode=&#039;&#039;;&amp;lt;/code&amp;gt; (be sure to use single quotes, and don&#039;t forget the semicolon).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
====Using a hosted server====&lt;br /&gt;
If you are using a webhost, they will probably have a control panel web interface for you to create your database.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;[http://www.cpanel.com/ cPanel]&#039;&#039;&#039; system is one of the most popular of these. &lt;br /&gt;
To create a database using cPanel:&lt;br /&gt;
&lt;br /&gt;
# Click on the &#039;&#039;&#039;MySQL Databases&#039;&#039;&#039; icon.&lt;br /&gt;
# Type &#039;&#039;&#039;moodle&#039;&#039;&#039; in the New Database field and click &#039;&#039;&#039;Create Database&#039;&#039;&#039;.&lt;br /&gt;
# Type a &#039;&#039;username&#039;&#039; and &#039;&#039;password&#039;&#039; (not one you use elsewhere) in the respective fields and click &#039;&#039;&#039;Create  User&#039;&#039;&#039;.&amp;lt;br&amp;gt;Note that the &#039;&#039;username&#039;&#039; and &#039;&#039;database&#039;&#039; names may be prefixed by your cPanel account name and an underscore, and truncated to 16 characters. When entering this information into the Moodle installer - use the full names.&lt;br /&gt;
# Now use the &#039;&#039;&#039;Add Users to Databases&#039;&#039;&#039; button and give this new user account &#039;&#039;&#039;ALL&#039;&#039;&#039; rights to the new database.&lt;br /&gt;
&lt;br /&gt;
Continue with [[Installing_Moodle#CreatDataDir |Creating the data directory]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Using the command line====&lt;br /&gt;
&lt;br /&gt;
If you have access to Unix or Windows command lines then you can do the same sort of thing by typing commands. You should do this using the MySQL Client program as follows (commands which you type-in are shown in bold):&lt;br /&gt;
&lt;br /&gt;
- Start the MySQL Client program:&lt;br /&gt;
 #&#039;&#039;&#039;mysql -u root -p&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 2 to server version: 5.0.22-log&lt;br /&gt;
 &lt;br /&gt;
 Type &#039;help;&#039; or &#039;\h&#039; for help. Type &#039;\c&#039; to clear the buffer.&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- The prompt changes to &amp;quot;mysql&amp;gt;&amp;quot; to indicate that you are now working in the MySQL Client program. When working in MySQL, all commands which you type-in must end in a semi-colon. (If you hit the Enter key without the final semi-colon, you&#039;ll get the line continuation symbol &#039;-&amp;gt;&#039;; this is your second chance to type the semi-colon and hit Enter.) &lt;br /&gt;
&lt;br /&gt;
- Begin by checking for any existing databases called &amp;quot;moodle&amp;quot; - if there are any you should change the name in all the commands which follow:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;SHOW DATABASES;&#039;&#039;&#039;&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | Database                |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | information_schema      |&lt;br /&gt;
 | mysql                   |&lt;br /&gt;
 | test                    |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 3 rows in set (0.03 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a database to store the Moodle tables. We&#039;ll call this &amp;quot;moodle&amp;quot;, as there are none with that name already in the above list, but change it if you need to.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;CREATE DATABASE moodle;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Change the default character set and collation of the &amp;quot;moodle&amp;quot; database to UTF8. Leave this out if you are installing Moodle 1.5 or earlier):&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a username and password to access the database &amp;quot;moodle&amp;quot; and grant database access permissions. We&#039;ll call the user &amp;quot;moodleuser&amp;quot; and set the password as &amp;quot;yourpassword&amp;quot;. It&#039;s a good idea to change these for your installation however most people keep the username as &amp;quot;moodleuser&amp;quot;. Remember the username and password you have set, as you&#039;ll need it in the configuration screens later. This is a long command so has been split over several lines by pressing the Return key.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;DROP,INDEX,ALTER ON moodle.*&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;TO moodleuser@localhost IDENTIFIED BY &#039;yourpassword&#039;;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Security Warnings&#039;&#039;&#039;: Never leave the password as the one shown here. Make sure you have a strong password (a mixture of letters and numbers, upper and lower case). Avoid granting &amp;quot;ALL&amp;quot; permissions on the database.&lt;br /&gt;
: &#039;&#039;&#039;Note&#039;&#039;&#039;: For MySQL 4.0.1 or earlier, you don&#039;t need the CREATE TEMPORARY TABLES permission. &lt;br /&gt;
&lt;br /&gt;
- Exit the MySQL Client program:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;QUIT&#039;&#039;&#039;&lt;br /&gt;
 Bye&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
- Reload the grant tables using the mysqladmin program:&lt;br /&gt;
 #&#039;&#039;&#039;mysqladmin -u root -p reload&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
And some example command lines for PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
   # su - postgres&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create user moodleuser createdb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create database moodle &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;with encoding &#039;unicode&#039;&amp;lt;/font&amp;gt;;&amp;quot; -U moodleuser template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser nocreatedb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser with encrypted password &#039;yourpassword&#039;;&amp;quot; template1&lt;br /&gt;
   &amp;gt; su - root&lt;br /&gt;
   # /etc/init.d/postgresql reload&lt;br /&gt;
&lt;br /&gt;
If the Postgres create database command above (&amp;gt;psql -c &amp;quot;create database moodle...&amp;quot;) gives an error message you may want to try:&lt;br /&gt;
 psql -c &amp;quot;create database moodle with template=template1 encoding = &#039;unicode&#039; owner =  moodleuser &amp;lt;br&amp;gt;     location = &#039;/var/mydata&#039;;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If the create database command asks you for a password, run the line containing &#039;encrypted password&#039; first before proceeding.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
* Step-by-step instructions on  [https://docs.moodle.org/en/Step-by-step_Install_Guide_for_Ubuntu installation for Ubuntu(Debian)]&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the data directory  ===&lt;br /&gt;
&lt;br /&gt;
Moodle will also need some space on your server&#039;s hard disk to store uploaded files, such as course documents and user pictures. The Moodle installer tries hard to create the &#039;&#039;&#039;moodledata&#039;&#039;&#039; directory for you but if it fails then you will have to create a directory for this purpose manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Security warning&#039;&#039;&#039;: For security purposes, it is &#039;&#039;&#039;CRITICAL&#039;&#039;&#039; that this directory is &#039;&#039;&#039;NOT&#039;&#039;&#039; accessible directly via the web. The easiest way to do this is to simply locate it OUTSIDE the web site root directory (it is the folder that the main part of your URL -that is, the part up to the first single / - points to; for example, in &amp;lt;nowiki&amp;gt;http://your.domain.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;, it is &amp;lt;nowiki&amp;gt;http://your.domain.com/&amp;lt;/nowiki&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
But if you must have it in the web directory (and you are using Apache AND the web server configuration allows .htaccess files to restrict access to directories) then protect it by creating a file in the data directory called &#039;&#039;&#039;.htaccess&#039;&#039;&#039;, containing these lines:&lt;br /&gt;
&lt;br /&gt;
 order deny,allow&lt;br /&gt;
 deny from all&lt;br /&gt;
&lt;br /&gt;
If you are using IIS, you need to edit the properties of the data directory (from the Internet Information Services Manager console) and deny access to that folder to everybody from the web.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you don&#039;t protect the data directory from direct web access, anybody will be able to impersonate any user of your Moodle site (including the admin user!!!), and all of your course materials will be available to the web at large.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ownership &amp;amp; Permissions&#039;&#039;&#039;: To make sure that Moodle can save uploaded files in this directory, check that the web server software has permission to read, write and execute in this directory. On Unix machines, this means setting the owner of the directory to be something like &amp;quot;nobody&amp;quot; or &amp;quot;apache&amp;quot;, and then giving that user read, write and execute permissions. As an example, to change the owner to &amp;quot;nobody&amp;quot; you could use:&lt;br /&gt;
&lt;br /&gt;
 chown -R nobody:apache moodledata&lt;br /&gt;
&lt;br /&gt;
To change the permissions so that the owner has read,write and execute permissions, use something like this:&lt;br /&gt;
&lt;br /&gt;
 chmod -R 0770 moodledata&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: If you are receiving permission denied messages, try &#039;&#039;chmod -R 0770 moodledata&#039;&#039; and then adjust the settings so that they are more secure. A more secure setting is &#039;&#039;chmod -R 0750 moodledata&#039;&#039;. According to the comments in config-dist.php, &amp;quot;On hosting systems you might need to make sure that your group has no permissions at all while others have full permissions.&amp;quot; To do this you could use &#039;&#039;chmod -R 707 moodledata&#039;&#039;. See also the [[Security | security page]].&lt;br /&gt;
&lt;br /&gt;
Remember that by default moodle will issue a warning about moodle data directories created inside the web directory, but otherwise this directory can be located where you wish. You can later move or change the location of this directory, but if you do, be sure to edit the setting in the &#039;&#039;&#039;config.php&#039;&#039;&#039; file that sets this; e.g. if moodledata is under a directory called data, then it would look like this:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/data/moodledata&#039;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CPanel and webhosts&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
On cPanel systems you can use the &amp;quot;File Manager&amp;quot; to find the folder, click on it, then choose &amp;quot;Change Permissions&amp;quot;. On many shared hosting servers, you will probably need to restrict all file access to your &amp;quot;group&amp;quot; (to prevent other webhost customers from looking at or changing your files), but provide full read/write access to everyone else (which will allow the web server to access your files). Speak to your server administrator if you are having trouble setting this up securely. In particular it will not be possible to create a usable data directory on sites that use a PHP feature known as &amp;quot;&#039;&#039;&#039;Safe Mode&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Run the installer script to create config.php ==&lt;br /&gt;
&lt;br /&gt;
To run the installer script (install.php), just try to access your Moodle main URL using a web browser, or access &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourserver/install.php&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039; directly.&lt;br /&gt;
&lt;br /&gt;
(The Installer will try to set a session cookie. If you get a popup warning in your browser make sure you accept that cookie!)&lt;br /&gt;
&lt;br /&gt;
Moodle will detect that configuration is necessary and will lead you through some screens to help you create a new configuration file called &#039;&#039;&#039;config.php&#039;&#039;&#039;. At the end of the process Moodle will try and write the file into the right location, otherwise you can press a button to download it from the installer and then upload &#039;&#039;&#039;config.php&#039;&#039;&#039; into the main Moodle directory on the server.&lt;br /&gt;
&lt;br /&gt;
Along the way the installer will test your server environment and give you suggestions about how to fix any problems. For most common issues these suggestions should be sufficient, but if you get stuck, check in the Installation Forum for more help.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Go to the admin page to continue configuration ==&lt;br /&gt;
&lt;br /&gt;
Once the basic config.php has been correctly created in the previous step, trying to access the front page of your site will take you to the &amp;quot;admin&amp;quot; page for the rest of the configuration.&lt;br /&gt;
&lt;br /&gt;
The first time you access this admin page, you will be presented with a GPL &amp;quot;shrink wrap&amp;quot; agreement with which you must agree before you can continue with the setup.&lt;br /&gt;
&lt;br /&gt;
Now Moodle will start setting up your database and creating tables to store data. Firstly, the main database tables are created. You should see a number of SQL statements followed by status messages that look like this:&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE course (&lt;br /&gt;
    id int(10) unsigned NOT NULL auto_increment,&lt;br /&gt;
    category int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    password varchar(50) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    fullname varchar(254) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    shortname varchar(15) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    summary text NOT NULL,&lt;br /&gt;
    format tinyint(4) NOT NULL default &#039;1&#039;,&lt;br /&gt;
    teacher varchar(100) NOT NULL default &#039;Teacher&#039;,&lt;br /&gt;
    startdate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    enddate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    timemodified int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    PRIMARY KEY (id)&lt;br /&gt;
 ) TYPE=MyISAM;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;SUCCESS&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and so on, followed by: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Main databases set up successfully.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see these, then there must have been some problem with the database or the configuration settings you defined in config.php. Check that PHP isn&#039;t in a restricted &amp;quot;Safe Mode&amp;quot; (commercial web hosts sometimes have safe mode turned on). You can check PHP variables by creating a little file containing &#039;&#039;&#039;&amp;lt;?php phpinfo() ?&amp;gt;&#039;&#039;&#039; and looking at it through a browser. Check all these and try this page again.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
You should now see a form where you can define more configuration variables for your installation, such as the default language, SMTP hosts and so on. Don&#039;t worry too much about getting everything right just now - you can always come back and edit these later on using the admin interface. The defaults are designed to be useful and secure for most sites. Scroll down to the bottom and click &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If (and only if) you find yourself getting stuck on this page, unable to continue, then your server probably has what I call the &amp;quot;buggy referrer&amp;quot; problem. This is easy to fix: just turn off the &amp;quot;secureforms&amp;quot; setting, then try to continue again.&lt;br /&gt;
&lt;br /&gt;
Next you will see more pages that print lots of status messages as they set up all the tables required by the various Moodle module. As before, they should all be &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;green&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
The next page is a form where you can define parameters for your Moodle site and the front page, such as the name, format, description and so on. Fill this out (you can always come back and change these later) and then press &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Finally, you will then be asked to create a top-level administration user for future access to the admin pages. Fill out the details with your own name, email etc and then click &amp;quot;Save changes&amp;quot;. Not all the fields are required, but if you miss any important fields you&#039;ll be re-prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you remember the username and password you chose for the administration user account, as they will be necessary to access the administration page in future.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(If for any reason your install is interrupted, or there is a system error of some kind that prevents you from logging in using the admin account, you can usually log in using the default username of &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;, with password &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
Once successful, you will be returned to the home page of your new site! Note the administration links that appear down the left hand side of the page (these items also appear on a separate Admin page) - these items are only visible to you because you are logged in as the admin user. All your further administration of Moodle can now be done using this menu, such as:&lt;br /&gt;
&lt;br /&gt;
* creating and deleting courses&lt;br /&gt;
* creating and editing user accounts&lt;br /&gt;
* administering teacher accounts&lt;br /&gt;
* changing site-wide settings like themes etc&lt;br /&gt;
&lt;br /&gt;
But you are not done installing yet! There is one very important thing still to do (see the next section on cron).&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Installing Moodle Using Command Line ==&lt;br /&gt;
&lt;br /&gt;
Installing Moodle Using command line is just as easy as installing Moodle using web browser. &lt;br /&gt;
* First Go to the moodle root directory and then to admin directory inside the moodle root. &lt;br /&gt;
&lt;br /&gt;
 $cd /var/www/html/moodle/admin&lt;br /&gt;
&lt;br /&gt;
* Then simply use the following syntax to run the moodle command line installer&lt;br /&gt;
 $php cliupgrade.php --lang=en --webaddr=http://www.example.com --moodledir=/var/www/html/moodle --datadir=/var/moodledata --dbtype=mysql --dbhost=localhost --dbname=moodle --dbuser=root --prefix=mdl --verbose=1 --interactivelevel=2 &lt;br /&gt;
&lt;br /&gt;
More information about the options can be found using &lt;br /&gt;
$php cliupgrad.php --help&lt;br /&gt;
&lt;br /&gt;
Then you will see the following list of available options&lt;br /&gt;
&lt;br /&gt;
 --lang		 		Valid installed language for installation. Default is English(en)&lt;br /&gt;
 --webaddr			Web address for the Moodle site&lt;br /&gt;
 --moodledir			Location of the moodle web folder&lt;br /&gt;
 --datadir			Location of the moodle data folder (should not be web visible)&lt;br /&gt;
 --dbtype			Database type. Default it mysql&lt;br /&gt;
 --dbhost			Database host. Default localhost&lt;br /&gt;
 --dbname			Database name. Default is moodle&lt;br /&gt;
 --dbuser			Database user. Default is blank&lt;br /&gt;
 --dbpass			Database password. Default is blank&lt;br /&gt;
 --prefix			        Table prefix for above database tables. Default is mdl&lt;br /&gt;
 --verbose			0 No output, 1 Summarized output(Default), 2 Detailed output&lt;br /&gt;
 --interactivelevel	        0 Non interactive, 1 Semi interactive(Default), 2 Interactive&lt;br /&gt;
 --help				print out this help&lt;br /&gt;
&lt;br /&gt;
When you choose non interactive mode without any options all the default values are assumed.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Set up cron ==&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s background tasks (e.g. sending out forum emails and performing course backups) are performed by a script which you can set to execute at specific times of the day. This is known as a cron script. Please refer to the [[Cron|Cron instructions]].&lt;br /&gt;
&lt;br /&gt;
== Set up backups ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[Backup settings| backup instructions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Create a new course ==&lt;br /&gt;
&lt;br /&gt;
Now that Moodle is running properly, you can try creating a new course to play with.&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Create a new course&amp;quot; from the Admin page (or the admin links on the home page).&lt;br /&gt;
&lt;br /&gt;
Fill out the form, paying special attention to the course format. You don&#039;t have to worry about the details too much at this stage, as everything can be changed later by the teacher. Note that the yellow help icons are everywhere to provide contextual help on any aspect.&lt;br /&gt;
&lt;br /&gt;
Press &amp;quot;Save changes&amp;quot;, and you will be taken to a new form where you can assign teachers to the course. You can only add existing user accounts from this form - if you want to create a new teacher account then either ask the teacher to create one for themselves (see the login page), or create one for them using the &amp;quot;Add a new user&amp;quot; on the Admin page.&lt;br /&gt;
&lt;br /&gt;
Once done, the course is ready to customize, and is accessible via the &amp;quot;Courses&amp;quot; link on the home page.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Installation FAQ]]&lt;br /&gt;
* [[Complete install packages]] might be an easier first time installs on some systems&lt;br /&gt;
* Help forum:  [http://moodle.org/mod/forum/view.php?id=28 Installation problems]&lt;br /&gt;
* [[Installing Apache, MySQL and PHP]] - Open source programs that can run Moodle on the web or on a desktop&lt;br /&gt;
* [[Upgrading Moodle]]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=42688 Selecting a web host for Moodle] forum discussion&lt;br /&gt;
* [[masquerading|Masquerading]] - Running Moodle behind a masquerading/NAT firewall&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[cs:Instalace]]&lt;br /&gt;
[[de:Installieren von Moodle]]&lt;br /&gt;
[[es:Instalación de moodle]]&lt;br /&gt;
[[fr:Installation de Moodle]]&lt;br /&gt;
[[ja:Moodleのインストール]]&lt;br /&gt;
[[nl:Installatiegids]]&lt;br /&gt;
[[pl:Instalacja Moodle]]&lt;br /&gt;
[[pt:Instalação do Moodle]]&lt;br /&gt;
[[ru:Установка Moodle]]&lt;br /&gt;
[[sk:Inštalácia]]&lt;br /&gt;
[[zh:安装Moodlezh:]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Installing_Moodle&amp;diff=41497</id>
		<title>Talk:Installing Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Installing_Moodle&amp;diff=41497"/>
		<updated>2008-08-06T07:42:31Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Some things I came across */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Additional requirements==&lt;br /&gt;
&lt;br /&gt;
Should the installation page mention some of the more detailed PHP requirements also, like GD library and the FreeType 2 library on Linux/Unix boxes to be able to look at the dynamic graphs that the logs pages make? [[User:SamuliK|SamuliK]] 13 January 2006 11:10 (WST)&lt;br /&gt;
&lt;br /&gt;
:Yes, good idea - please contribute :-) [[User:Helen|Helen]] 13 January 2006 11:35 (WST)&lt;br /&gt;
&lt;br /&gt;
Please add to the &amp;quot;Requirements&amp;quot; section of the Installation Instructions something such as:&lt;br /&gt;
&lt;br /&gt;
During Installation of Moodle the PHP Memory Limit should be set to 16M. Many commercial hosting providers have this set to 8M only. To find out your PHP Memory Limit use PHP Info. You may have to ask your service provider to increase the PHP Memory Limit before you can complete the installation.&lt;br /&gt;
&lt;br /&gt;
Thanks for your help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
maybe this could be a good place to mention something for BUG 4937 &amp;quot;some SCORM objects contain HTC files which are not automatically supported by APACHE, if you are using APACHE and make use of large numbers of SCORM objects then you may want to add the following MIME Type.... etc....&lt;br /&gt;
see here for details:&lt;br /&gt;
http://moodle.org/bugs/bug.php?op=show&amp;amp;bugid=4937&amp;amp;pos=24&lt;br /&gt;
--[[User:Dan Marsden|Dan Marsden]] 13:57, 8 June 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==confused about==&lt;br /&gt;
1) Reload the grant tables using the mysqladmin program:&lt;br /&gt;
 #mysqladmin -u root -p reload&lt;br /&gt;
 Enter password:&lt;br /&gt;
 &#039;requires reload priviledge&#039;&lt;br /&gt;
&lt;br /&gt;
2)And some example command lines for PostgreSQL:&lt;br /&gt;
   # su - postgres&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create user moodleuser createdb;&amp;quot; template1&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
What&#039;s the PostgreSQL about?&lt;br /&gt;
&lt;br /&gt;
[[User:Dennis German|Dennis German]] 20:13, 28 January 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
It&#039;s another database server you can use with Moodle instead of MySQL.&lt;br /&gt;
[[User:Richard Enison|Richard Enison]] 02:39, 6 August 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Some things I came across==&lt;br /&gt;
First-time user of Moodle, so I&#039;m commenting here rather than editing, just to be on the safe side :-) -- two things have caught my attention:&lt;br /&gt;
* &amp;quot;# mysqladmin -u root -p reload&amp;quot; -- this step is unnecessary. The reload command is only for when you fiddle directly with the mysql permission tables, but not needed when you do a GRANT.&lt;br /&gt;
* &amp;quot;Remember by default, mysql won&#039;t accept moodle data directories created under ROOT&amp;quot; -- not sure what is meant by this sentence? The data directory in question is for storing files, not db data, right?&lt;br /&gt;
--[[User:Carsten Pedersen|Carsten Pedersen]] 18:14, 27 January 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
Right. I think it means directories created and owned by the root (o/s) user.&lt;br /&gt;
--[[User:Richard Enison|Richard Enison]] 04:28, 23 November 2007 (CST)&lt;br /&gt;
But you&#039;ve got a point. I don&#039;t know what that has to do with mysql either. --[[User:Richard Enison|Richard Enison]] 02:42, 6 August 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Ref:PHP and MySQL==&lt;br /&gt;
Should there be special comment on the use of &amp;quot;--with-mysql&amp;quot; and &amp;quot;--with-mysqli&amp;quot; PHP configure options and outcomes (if any) for Moodle functions?&lt;br /&gt;
&lt;br /&gt;
--[[User:Paul Trudt|pd3244]] 13:12, 7 August 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
Re: &amp;quot;PHP Extensions and Libraries&amp;quot;:&lt;br /&gt;
Some guidance in how to enable or install those recommendations in the php.ini file would help me, so I imagine it would help others too. I&#039;m in the default php5 php.ini file right now, and it says,&lt;br /&gt;
&lt;br /&gt;
`[mbstring]&lt;br /&gt;
; language for internal character representation.&lt;br /&gt;
;mbstring.language = Japanese`&lt;br /&gt;
&lt;br /&gt;
--but I don&#039;t know what to do with that to make it what Moodle needs.&lt;br /&gt;
&lt;br /&gt;
Otherwise, smooth sailing so far. :)&lt;br /&gt;
--[[User:Clay Burell|Clay Burell]] 07:01, 28 July 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==  Structure of moodle directory ==&lt;br /&gt;
&lt;br /&gt;
Hi there,&lt;br /&gt;
&lt;br /&gt;
I&#039;m also new, so I try this way rather than editing directly. The &amp;quot;Structure of moodle directory&amp;quot; lists the directory &amp;quot;doc&amp;quot; which didn&#039;t come with the current 1.7.1+ version I downloaded.&lt;br /&gt;
&lt;br /&gt;
[[User:Sandra Reitz|Sandra Reitz]] 04:17, 16 February 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
== Installing on Netware ==&lt;br /&gt;
&lt;br /&gt;
Under system requirements this page indicates that it is possible to install on Netware 6.5. The latest versions of PHP for Netware appear to be 4.2.3 and 5.0.5, while Moodle 1.8 requires 4.3.0 or 5.1.0. This means that Moodle is no longer supported on the Netware platfrom and the documentation should indicate this.&lt;br /&gt;
&lt;br /&gt;
- Looking at http://forge.novell.com/modules/xfcontent/downloads.php/php/GCC%20Built%20Daily%20Releases there appears to be a download for php 5.1 (built in 2006-02, so it&#039;s old). I don&#039;t have a novell install anymore, so please can you confirm this. --[[User:Ken Wilson|Ken Wilson]] 06:21, 7 May 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Using a .htaccess file for webserver and PHP settings ==&lt;br /&gt;
under the above section are .htaccess settings such as&lt;br /&gt;
&lt;br /&gt;
php_flag magic_quotes_gpc 1&lt;br /&gt;
&lt;br /&gt;
As I correct in saying these would not work if running php as a .cgi?  If so, it needs saying.&lt;br /&gt;
&lt;br /&gt;
:Regarding the &amp;quot;Run the Install&amp;quot; job section. At least in Windows installs, you need to edit the config.php-dist file (which has template specs for various file loscations) and insert all the information about your install - root directory, database name and credentials, and data directory location. Then you can run the Install.php job and step through the process.&lt;br /&gt;
&lt;br /&gt;
== Missing documentation for Multiple Servers Installation ==&lt;br /&gt;
I think that section [https://docs.moodle.org/en/Installing_Moodle#Creating_the_data_directory 5.5 creating the data directory]  should mention whether it is possible to define a folder which is located on a remote server.&lt;br /&gt;
&lt;br /&gt;
Is it possible? – I try to do that by mapping a drive on a Windows Server to another server. Will update you on the results.&lt;br /&gt;
&lt;br /&gt;
Also, I agree that the title of the section is misleading: Data directory implies Database. Files Directory or Uploads directory, are better options, to my humble opinion.&lt;br /&gt;
[[User:טל בודק|טל בודק]] 04:07, 1 June 2008 (CDT)&lt;br /&gt;
:I agree with you about the section name change. The Window&#039;s complete install packages call this folder by default Moodledata. I would suggest that be in the section name as well.   Maybe &amp;quot;Moodledata and uploaded files directories&amp;quot; would help the new user.  Old pros will get it right away :)--[[User:chris collman|chris collman]] 06:13, 11 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Missing documentation for pear ==&lt;br /&gt;
&lt;br /&gt;
Pear is included in Moodle /moodle/lib/pear/ but it not called directly.&lt;br /&gt;
&lt;br /&gt;
for e.g. in file /moodle/lib/formslib.php&lt;br /&gt;
&lt;br /&gt;
require_once &#039;HTML/QuickForm.php&#039;;&lt;br /&gt;
&lt;br /&gt;
For this to work either all these pear packages must be installed on server or /moodle/lib/pear/ should be included in php include_path.&lt;br /&gt;
&lt;br /&gt;
Should this be mentioned in documentation or developers might want to upgrade code in a way that will eliminate this problem.&lt;br /&gt;
&lt;br /&gt;
require_once $CFG-&amp;gt;libdir.&#039;pear/HTML/QuickForm.php&#039;; (Don&#039;t know how good or bad it may be)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Installing_Moodle&amp;diff=41496</id>
		<title>Talk:Installing Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Installing_Moodle&amp;diff=41496"/>
		<updated>2008-08-06T07:39:13Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* confused about */ answered&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Additional requirements==&lt;br /&gt;
&lt;br /&gt;
Should the installation page mention some of the more detailed PHP requirements also, like GD library and the FreeType 2 library on Linux/Unix boxes to be able to look at the dynamic graphs that the logs pages make? [[User:SamuliK|SamuliK]] 13 January 2006 11:10 (WST)&lt;br /&gt;
&lt;br /&gt;
:Yes, good idea - please contribute :-) [[User:Helen|Helen]] 13 January 2006 11:35 (WST)&lt;br /&gt;
&lt;br /&gt;
Please add to the &amp;quot;Requirements&amp;quot; section of the Installation Instructions something such as:&lt;br /&gt;
&lt;br /&gt;
During Installation of Moodle the PHP Memory Limit should be set to 16M. Many commercial hosting providers have this set to 8M only. To find out your PHP Memory Limit use PHP Info. You may have to ask your service provider to increase the PHP Memory Limit before you can complete the installation.&lt;br /&gt;
&lt;br /&gt;
Thanks for your help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
maybe this could be a good place to mention something for BUG 4937 &amp;quot;some SCORM objects contain HTC files which are not automatically supported by APACHE, if you are using APACHE and make use of large numbers of SCORM objects then you may want to add the following MIME Type.... etc....&lt;br /&gt;
see here for details:&lt;br /&gt;
http://moodle.org/bugs/bug.php?op=show&amp;amp;bugid=4937&amp;amp;pos=24&lt;br /&gt;
--[[User:Dan Marsden|Dan Marsden]] 13:57, 8 June 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==confused about==&lt;br /&gt;
1) Reload the grant tables using the mysqladmin program:&lt;br /&gt;
 #mysqladmin -u root -p reload&lt;br /&gt;
 Enter password:&lt;br /&gt;
 &#039;requires reload priviledge&#039;&lt;br /&gt;
&lt;br /&gt;
2)And some example command lines for PostgreSQL:&lt;br /&gt;
   # su - postgres&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create user moodleuser createdb;&amp;quot; template1&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
What&#039;s the PostgreSQL about?&lt;br /&gt;
&lt;br /&gt;
[[User:Dennis German|Dennis German]] 20:13, 28 January 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
It&#039;s another database server you can use with Moodle instead of MySQL.&lt;br /&gt;
[[User:Richard Enison|Richard Enison]] 02:39, 6 August 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Some things I came across==&lt;br /&gt;
First-time user of Moodle, so I&#039;m commenting here rather than editing, just to be on the safe side :-) -- two things have caught my attention:&lt;br /&gt;
* &amp;quot;# mysqladmin -u root -p reload&amp;quot; -- this step is unnecessary. The reload command is only for when you fiddle directly with the mysql permission tables, but not needed when you do a GRANT.&lt;br /&gt;
* &amp;quot;Remember by default, mysql won&#039;t accept moodle data directories created under ROOT&amp;quot; -- not sure what is meant by this sentence? The data directory in question is for storing files, not db data, right?&lt;br /&gt;
--[[User:Carsten Pedersen|Carsten Pedersen]] 18:14, 27 January 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
Right. I think it means directories created and owned by the root (o/s) user.&lt;br /&gt;
--[[User:Richard Enison|Richard Enison]] 04:28, 23 November 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
==Ref:PHP and MySQL==&lt;br /&gt;
Should there be special comment on the use of &amp;quot;--with-mysql&amp;quot; and &amp;quot;--with-mysqli&amp;quot; PHP configure options and outcomes (if any) for Moodle functions?&lt;br /&gt;
&lt;br /&gt;
--[[User:Paul Trudt|pd3244]] 13:12, 7 August 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
Re: &amp;quot;PHP Extensions and Libraries&amp;quot;:&lt;br /&gt;
Some guidance in how to enable or install those recommendations in the php.ini file would help me, so I imagine it would help others too. I&#039;m in the default php5 php.ini file right now, and it says,&lt;br /&gt;
&lt;br /&gt;
`[mbstring]&lt;br /&gt;
; language for internal character representation.&lt;br /&gt;
;mbstring.language = Japanese`&lt;br /&gt;
&lt;br /&gt;
--but I don&#039;t know what to do with that to make it what Moodle needs.&lt;br /&gt;
&lt;br /&gt;
Otherwise, smooth sailing so far. :)&lt;br /&gt;
--[[User:Clay Burell|Clay Burell]] 07:01, 28 July 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==  Structure of moodle directory ==&lt;br /&gt;
&lt;br /&gt;
Hi there,&lt;br /&gt;
&lt;br /&gt;
I&#039;m also new, so I try this way rather than editing directly. The &amp;quot;Structure of moodle directory&amp;quot; lists the directory &amp;quot;doc&amp;quot; which didn&#039;t come with the current 1.7.1+ version I downloaded.&lt;br /&gt;
&lt;br /&gt;
[[User:Sandra Reitz|Sandra Reitz]] 04:17, 16 February 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
== Installing on Netware ==&lt;br /&gt;
&lt;br /&gt;
Under system requirements this page indicates that it is possible to install on Netware 6.5. The latest versions of PHP for Netware appear to be 4.2.3 and 5.0.5, while Moodle 1.8 requires 4.3.0 or 5.1.0. This means that Moodle is no longer supported on the Netware platfrom and the documentation should indicate this.&lt;br /&gt;
&lt;br /&gt;
- Looking at http://forge.novell.com/modules/xfcontent/downloads.php/php/GCC%20Built%20Daily%20Releases there appears to be a download for php 5.1 (built in 2006-02, so it&#039;s old). I don&#039;t have a novell install anymore, so please can you confirm this. --[[User:Ken Wilson|Ken Wilson]] 06:21, 7 May 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Using a .htaccess file for webserver and PHP settings ==&lt;br /&gt;
under the above section are .htaccess settings such as&lt;br /&gt;
&lt;br /&gt;
php_flag magic_quotes_gpc 1&lt;br /&gt;
&lt;br /&gt;
As I correct in saying these would not work if running php as a .cgi?  If so, it needs saying.&lt;br /&gt;
&lt;br /&gt;
:Regarding the &amp;quot;Run the Install&amp;quot; job section. At least in Windows installs, you need to edit the config.php-dist file (which has template specs for various file loscations) and insert all the information about your install - root directory, database name and credentials, and data directory location. Then you can run the Install.php job and step through the process.&lt;br /&gt;
&lt;br /&gt;
== Missing documentation for Multiple Servers Installation ==&lt;br /&gt;
I think that section [https://docs.moodle.org/en/Installing_Moodle#Creating_the_data_directory 5.5 creating the data directory]  should mention whether it is possible to define a folder which is located on a remote server.&lt;br /&gt;
&lt;br /&gt;
Is it possible? – I try to do that by mapping a drive on a Windows Server to another server. Will update you on the results.&lt;br /&gt;
&lt;br /&gt;
Also, I agree that the title of the section is misleading: Data directory implies Database. Files Directory or Uploads directory, are better options, to my humble opinion.&lt;br /&gt;
[[User:טל בודק|טל בודק]] 04:07, 1 June 2008 (CDT)&lt;br /&gt;
:I agree with you about the section name change. The Window&#039;s complete install packages call this folder by default Moodledata. I would suggest that be in the section name as well.   Maybe &amp;quot;Moodledata and uploaded files directories&amp;quot; would help the new user.  Old pros will get it right away :)--[[User:chris collman|chris collman]] 06:13, 11 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Missing documentation for pear ==&lt;br /&gt;
&lt;br /&gt;
Pear is included in Moodle /moodle/lib/pear/ but it not called directly.&lt;br /&gt;
&lt;br /&gt;
for e.g. in file /moodle/lib/formslib.php&lt;br /&gt;
&lt;br /&gt;
require_once &#039;HTML/QuickForm.php&#039;;&lt;br /&gt;
&lt;br /&gt;
For this to work either all these pear packages must be installed on server or /moodle/lib/pear/ should be included in php include_path.&lt;br /&gt;
&lt;br /&gt;
Should this be mentioned in documentation or developers might want to upgrade code in a way that will eliminate this problem.&lt;br /&gt;
&lt;br /&gt;
require_once $CFG-&amp;gt;libdir.&#039;pear/HTML/QuickForm.php&#039;; (Don&#039;t know how good or bad it may be)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=41495</id>
		<title>Installing Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=41495"/>
		<updated>2008-08-06T07:36:23Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: add note on availability of tutorial&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Firstly don&#039;t panic! :-)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This guide explains how to install Moodle for the first time. For some of these steps it goes into a lot of detail to try and cover the majority of possible web server setups, so this page may look long and complicated. Don&#039;t panic, once you know how to do it you can install Moodle in minutes!&lt;br /&gt;
&lt;br /&gt;
If you have problems please read this page carefully - most common issues are answered in here. If you still have trouble, you can seek help from the Moodle community via  [http://moodle.org/course/view.php?id=5 moodle.org Using Moodle].&lt;br /&gt;
&lt;br /&gt;
Another option is to contact a [http://moodle.com/hosting/ Moodle Partner providing Moodle hosting] who can completely maintain Moodle for you, so that you can ignore all this and get straight into educating! A Moodle partner is the preferred option but if you decide to choose a hosting company that has cpanel then [http://otaru-jc.ac.jp/hagley/settingupmoodleonhostingwithcpanel.swf this tutorial will guide you]  through the process of choosing a host and setting up moodle via cpanel (not currently available). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; some hosting companies offer one-click moodle install options, which whilst sometimes effective, usually use old (sometimes years old) versions of moodle and sometimes simply don&#039;t work. If one of these goes wrong, your best bet is often to start from scratch following the instructions here yourself. Its almost certainly quicker.&lt;br /&gt;
&lt;br /&gt;
If you want to run Moodle on your own computer and this page looks a bit daunting, then please see our guides: [[Installing AMP |Installing Apache, MySQL and PHP(AMP)]] or [[Complete install packages| how to install one of Moodle&#039;s complete packages]]. They provide alternative instructions to install all this on most popular platforms.&lt;br /&gt;
==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
Moodle is primarily developed in Linux using [[Apache]], [[MySQL]] and [[PHP]] (also sometimes known as the LAMP platform), but is also regularly tested with Windows XP/2000/2003 (WAMP), Solaris 10 (Sparc and x64), Mac OS X and Netware 6 operating systems. Support for PostgreSQL, Oracle and Microsoft SQL Server is also available.&lt;br /&gt;
&lt;br /&gt;
The procedure for installing Moodle on the Windows platform (e.g. Windows Server, IIS and MSSQL) varies slightly to the procedure for the LAMP platform. See [[Installation for Windows 2003 with IIS]] for more details.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blank page problem while installing Moodle on Windows Vista may occur; following these steps: [[Installing Moodle on Windows Vista]] might help.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note if you are using a hosted account&#039;&#039;&#039;: Most web hosts support all of these requirements by default. You should contact your web host&#039;s support desk to check that this is the case &#039;&#039;&#039;before&#039;&#039;&#039; signing-up with them. It is especially important to ask about any PHP memory limits or MySQL question limits. If your prospective host does not provide a service which meets these requirements, or you are already signed up with them, ask them why and consider taking your business elsewhere if they do not change.&lt;br /&gt;
&lt;br /&gt;
The requirements for Moodle are as follows:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hardware&#039;&#039;&#039; (unless you are using a hosted server). &lt;br /&gt;
* Disk space: 160MB free (min). You will require more free space to store your teaching materials.&lt;br /&gt;
* Memory: 256MB (min), 1GB (recommended). The general rule of thumb is that Moodle can support 50 &#039;&#039;concurrent&#039;&#039; users for every 1GB of RAM, but this will vary depending on your specific hardware and software combination. &lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
* Web server software. Most people use [[Apache]], but Moodle should work fine under any web server that supports [[PHP]], such as [[IIS]] on Windows platforms. PHP does impose requirements on versions of web servers, however these are complex and the general advice is to use the newest version possible of your chosen web server. &lt;br /&gt;
* PHP scripting language. (Please note that there have been issues installing Moodle with [http://www.php-accelerator.co.uk PHP-Accelerator]). There are currently two versions (or branches) of PHP available: PHP4 and PHP5 and the version requirements are listed below.&lt;br /&gt;
** For Moodle version 1.4 or later: PHP4 (version 4.1.0 or later) or PHP5 (version 5.1.0 or later) are supported.&lt;br /&gt;
** For Moodle version 1.6 or later: the PHP4 (version 4.3.0 or later) or PHP5 (version 5.1.0 or later) are supported. &lt;br /&gt;
** Future Moodle versions 2.0 or later will not support PHP4 and will require PHP5 (version 5.2.0 or later).&lt;br /&gt;
** PHP Settings. Check these settings in your php.ini or .htaccess file (if you&#039;re using Apache). For settings which use ON/OFF as their values, you can substitute 1 for ON and 0 for OFF if you prefer. &lt;br /&gt;
*** &#039;&#039;safe_mode&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;memory_limit&#039;&#039; should be at least 16M (32M is recommended for Moodle 1.7 and 40M for Moodle 1.8 or later). Large sites may need more than 128M. PHP 5.2.x requires higher memory_limit values than previous versions of PHP. 64bit operating systems require even more memory.&lt;br /&gt;
*** &#039;&#039;session.save_handler&#039;&#039; needs to be set to FILES.&lt;br /&gt;
*** &#039;&#039;magic_quotes_gpc&#039;&#039; should be ON. (It will be recommended to turn it off in 2.0.)&lt;br /&gt;
*** &#039;&#039;magic_quotes_runtime&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;file_uploads&#039;&#039; needs to be ON.&lt;br /&gt;
*** &#039;&#039;session.auto_start&#039;&#039; needs to be OFF.&lt;br /&gt;
*** &#039;&#039;session.bug_compat_warn&#039;&#039; needs to be OFF.&lt;br /&gt;
** PHP Extensions and libraries&lt;br /&gt;
*** The mbstring extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** The iconv extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** [http://www.libgd.org/ GD library] and the [http://www.freetype.org/ FreeType 2] library and extensions are needed to be able to look at the dynamic graphs that the logs pages make.&lt;br /&gt;
*** The mysql extension is required if you are using the MySQL database. Note that in some Linux distributions (notably Red Hat) this is an optional installation.&lt;br /&gt;
*** The pgsql extension is required if you are using the PostgreSQL database.&lt;br /&gt;
*** The zlib extension is required for zip/unzip functionality.&lt;br /&gt;
*** The curl extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The tokenizer extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The curl and openssl extensions are required for the Moodle network functionality (Moodle 1.8 or later).&lt;br /&gt;
*** Other PHP extensions may be required to support optional Moodle functionality, especially external authentication and/or enrolment (e.g. LDAP extension for LDAP authentication and the sockets extension for Chat server).&lt;br /&gt;
* A working database server: [[MySQL]] or [[PostgreSQL]] are completely supported and recommended for use with any version of Moodle. Support for Microsoft SQL Server and Oracle has been added in Moodle 1.7. MySQL is &#039;&#039;the&#039;&#039; choice for many people because it is very popular, but there are some [[Arguments in favour of PostgreSQL|arguments in favour of PostgreSQL]], especially if you are planning a large deployment. &lt;br /&gt;
** For Moodle 1.5, MySQL (version 3.23 or later) or PostgreSQL (7.4 or later). &lt;br /&gt;
** For Moodle 1.6, MySQL (version 4.1.12 or later) or PostgreSQL (7.4 or later).&lt;br /&gt;
** For Moodle 1.7, MySQL (version 4.1.12 or later), PostgreSQL (7.4 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
** For Moodle 1.8 or later, MySQL (version 4.1.12 or later), PostgreSQL (8.0 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
: MySQL Notes: For Moodle 1.6 or later, If you use latin languages only you can use MySQL 4.1.12. If you are using non-latin languages you require MySQL 4.1.16 or later. Currently the MySQL setting &amp;quot;strict mode&amp;quot; must be OFF (set to &amp;quot;&amp;quot; or &amp;quot;MYSQL40&amp;quot;) in the MySQL configuration file. &lt;br /&gt;
: PostgreSQL Notes: PostgreSQL 7.4 is recommended for earlier Moodle versions, since Moodle 1.8 only PostgreSQL 8.0 and above are supported.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== How many users? ==&lt;br /&gt;
&lt;br /&gt;
In addition to the hardware and software requirements, you will also need to think about the capacity of your Moodle installation in terms of the number of users it can handle. There are two numbers to plan for:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Browsing users&#039;&#039;&#039;: the maximum number of users able to browse your Moodle site. This is the number of computers in your organization or on your course (whichever is greater).&lt;br /&gt;
* &#039;&#039;&#039;Concurrent database users&#039;&#039;&#039;: the maximum number of concurrent database users (needed for Moodle activities such as quizzes). This is the number of users who will be using Moodle at the same time. In an educational institution, use your timetable/roster to obtain this figure.&lt;br /&gt;
&lt;br /&gt;
Once you know these figures for your users, you can start work out if your Moodle installation can support this capacity. The exact number of users depends on your hardware/software/network combination. Usually the amount of memory installed (RAM) is the deciding factor but a faster overall processor speed will also help in reducing waiting times for pages to load. &lt;br /&gt;
&lt;br /&gt;
The general rule of thumb for a single server is that the approx max concurrent users = RAM (GB) * 50 and the approx max browsing users = Approx max concurrent users * 5. As an example, a university with 500 total computers on campus and 100 concurrent users at any time will need approx 2GB of RAM on the one server to support the number of concurrent users.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note if you are using a hosted account&#039;&#039;&#039;: Ask your provider what limits are placed on the number of concurrent database connections and the processor load. This will give a good estimate of the number of users your Moodle install can manage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; As of August 31, 2007, Moodle 1.8.2+ is not recommended for large installations, especially if you have large number (e.g. 20,000+) of courses. The main reason is the codes related to ROLES are still not fully optimized with database queries and still need some work. If you are planning to use 1.8.x codes for a larger institution, please make sure that you have sufficient time to do your own testing and performance profiling.  Upgrade to Moodle 1.9!!&lt;br /&gt;
&lt;br /&gt;
[Update] This performance issue has been improved quite a bit in the most recent 1.8.3+ version (see this thread discussion: http://moodle.org/mod/forum/discuss.php?d=83281).  Moodle 1.9 has even more improvements in all areas and is the recommended version.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Download and copy files into place ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to get Moodle, either as a compressed package or via CVS. &lt;br /&gt;
* There are two types of compressed packages on the  [http://download.moodle.org/ download page: http://download.moodle.org/], the standard distribution with Moodle only files and the [[Complete install packages|complete install]], which contains programs to operate Moodle in a web environment.  &lt;br /&gt;
* To use CVS, helpful instructions are available at the [[CVS_for_Administrators | CVS for Administrators]] page. The full [http://cvs.moodle.org/moodle/ Moodle CVS repository] is also available for browsing. &lt;br /&gt;
&lt;br /&gt;
After downloading, unpack the archive using either &lt;br /&gt;
 tar -zxvf [filename]&lt;br /&gt;
or&lt;br /&gt;
 unzip [filename]&lt;br /&gt;
as appropriate. &lt;br /&gt;
&lt;br /&gt;
If using CVS, run the CVS Checkout command.&lt;br /&gt;
&lt;br /&gt;
You will now be left with a directory called &amp;quot;moodle&amp;quot;, containing a number of files and folders.&lt;br /&gt;
&lt;br /&gt;
You can either place the whole folder in your web server documents directory, in which case the site will be located at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com/moodle&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;, or you can copy all the contents straight into the main web server documents directory, in which case the site will be simply &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you are downloading Moodle to your local computer and then uploading it to your web site, it is usually better to upload the whole archive as one file, and then do the unpacking on the server. Even web hosting interfaces like cPanel allow you to uncompress archives in the &amp;quot;File Manager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Structure of moodle directory ===&lt;br /&gt;
&lt;br /&gt;
You can safely skip this section, but here is a quick summary of the contents of the Moodle folder, to help get you oriented:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;config.php&#039;&#039; - contains basic settings. This file does not come with Moodle - you will create it.&lt;br /&gt;
:&#039;&#039;install.php&#039;&#039; - the script you will run to create config.php&lt;br /&gt;
:&#039;&#039;version.php&#039;&#039; - defines the current version of Moodle code&lt;br /&gt;
:&#039;&#039;index.php&#039;&#039; - the front page of the site&lt;br /&gt;
:&#039;&#039;admin/&#039;&#039; - code to administrate the whole server&lt;br /&gt;
:&#039;&#039;auth/&#039;&#039; - plugin modules to authenticate users&lt;br /&gt;
:&#039;&#039;blocks/&#039;&#039; - plugin modules for the little side blocks on many pages&lt;br /&gt;
:&#039;&#039;calendar/&#039;&#039; - all the code for managing and displaying calendars&lt;br /&gt;
:&#039;&#039;course/&#039;&#039; - code to display and manage courses&lt;br /&gt;
:&#039;&#039;doc/&#039;&#039; - help documentation for Moodle (eg this page)&lt;br /&gt;
:&#039;&#039;files/&#039;&#039; - code to display and manage uploaded files&lt;br /&gt;
:&#039;&#039;lang/&#039;&#039; - texts in different languages, one directory per language&lt;br /&gt;
:&#039;&#039;lib/&#039;&#039; - libraries of core Moodle code&lt;br /&gt;
:&#039;&#039;login/&#039;&#039; - code to handle login and account creation&lt;br /&gt;
:&#039;&#039;mod/&#039;&#039; - all the main Moodle course modules are in here&lt;br /&gt;
:&#039;&#039;pix/&#039;&#039; - generic site graphics&lt;br /&gt;
:&#039;&#039;theme/&#039;&#039; - theme packs/skins to change the look of the site.&lt;br /&gt;
:&#039;&#039;user/&#039;&#039; - code to display and manage users&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Setting-up your system==&lt;br /&gt;
To ensure that Moodle will install successfully, you need to check that the web server settings are correct, then create a blank database for Moodle to use and finally create a directory on your hard disk for Moodle to save your materials and other files you upload into your courses.&lt;br /&gt;
&lt;br /&gt;
=== Check web server settings ===&lt;br /&gt;
&lt;br /&gt;
*Firstly, make sure that your web server is set up to use index.php as a default page (perhaps in addition to index.html, default.htm and so on). In Apache, this is done using a DirectoryIndex parameter in your httpd.conf file. Mine usually looks like this:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;DirectoryIndex&#039;&#039;&#039; index.php index.html index.htm&lt;br /&gt;
&lt;br /&gt;
:Just make sure index.php is in the list (and preferably towards the start of the list, for efficiency).&lt;br /&gt;
&lt;br /&gt;
*Secondly, &#039;&#039;&#039;if you are using Apache 2&#039;&#039;&#039;, then you should turn on the &#039;&#039;AcceptPathInfo&#039;&#039; variable, which allows scripts to be passed arguments like &amp;lt;nowiki&amp;gt;http://server/file.php/arg1/arg2&amp;lt;/nowiki&amp;gt;. This is essential to allow relative links between your resources, and also provides a performance boost for people using your Moodle web site. You can turn this on by adding these lines to your httpd.conf file. (NB: This setting, or any equivalent, is not required in Apache 1)&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
=== Recheck PHP settings ===&lt;br /&gt;
Moodle requires a number of PHP settings to be active for it to work. These were given in the Requirements section and &#039;&#039;&#039;On most servers these will already be the default settings&#039;&#039;&#039;.  However, some PHP servers (and some of the more recent PHP versions) may have things set differently, so it is useful to double-check that the settings are correct. These are defined in PHP&#039;s configuration file (usually called &#039;&#039;&#039;php.ini&#039;&#039;&#039;) or in the Apache &#039;&#039;&#039;.htaccess&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
 safe_mode = 0 (necessary)&lt;br /&gt;
 memory_limit = 40M (varies: minimum 16M, 32M Moodle v1.7, 40M Moodle v1.8, 128M large sites)&lt;br /&gt;
 session.save_handler = files (unless you are using another handler, e.g. mm)   &lt;br /&gt;
 magic_quotes_gpc = 1    (preferred but not necessary, 0 will be recommended in 2.0)&lt;br /&gt;
 magic_quotes_runtime = 0    (necessary)&lt;br /&gt;
 file_uploads = 1&lt;br /&gt;
 session.auto_start = 0&lt;br /&gt;
 session.bug_compat_warn = 0&lt;br /&gt;
&lt;br /&gt;
You may also want to set other, optional php.ini file settings while you are already editing it. For instance, you may want to reset the maximum upload size of file attachments, which usually defaults to 2M(egabytes). For instance, to set these to 16 Megabytes:&lt;br /&gt;
 &lt;br /&gt;
 post_max_size = 16M&lt;br /&gt;
 upload_max_filesize = 16M&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Using a .htaccess file for webserver and PHP settings ===&lt;br /&gt;
&lt;br /&gt;
Use the above if you can directly edit your server&#039;s files, but if you are setting-up Moodle on a webhost, or don&#039;t have access to &#039;&#039;&#039;httpd.conf&#039;&#039;&#039; or &#039;&#039;&#039;php.ini&#039;&#039;&#039; on your server, or you have Moodle on a server with other applications that require different settings, then don&#039;t worry, you can often still override the default settings. This only works on Apache servers and only when Overrides have been allowed in the main Apache configuration. Moodle is supplied with a htaccess file which you can use, or you can create your own file manually.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Use the default htaccess file&#039;&#039;&#039;. The easiest thing to do is just copy the sample file from moodle/lib/htaccess and edit it to suit your needs. It contains further instructions. For example, in a Unix shell:&lt;br /&gt;
&lt;br /&gt;
 cd moodle&lt;br /&gt;
 cp moodle/lib/htaccess .htaccess&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Create your own file&#039;&#039;&#039;. Alternatively you can create your own file called &#039;&#039;&#039;.htaccess&#039;&#039;&#039; in Moodle&#039;s main directory that contains lines like the following. &lt;br /&gt;
&lt;br /&gt;
 DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 php_value memory_limit 40M (adjust to your version of Moodle)&lt;br /&gt;
 php_flag magic_quotes_gpc 1&lt;br /&gt;
 php_flag magic_quotes_runtime 0&lt;br /&gt;
 php_flag file_uploads 1&lt;br /&gt;
 php_flag session.auto_start 0&lt;br /&gt;
 php_flag session.bug_compat_warn 0&lt;br /&gt;
&lt;br /&gt;
:If you have Apache version 2 installed, add these lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;IfDefine APACHE2&amp;gt;&lt;br /&gt;
     AcceptPathInfo on&lt;br /&gt;
 &amp;lt;/IfDefine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Otherwise add this single line:&lt;br /&gt;
&lt;br /&gt;
 AcceptPathInfo on&lt;br /&gt;
&lt;br /&gt;
:Optionally, you can also do things like define the maximum size for uploaded files, etc by adding these lines:&lt;br /&gt;
&lt;br /&gt;
 LimitRequestBody 0&lt;br /&gt;
 php_value upload_max_filesize 2M&lt;br /&gt;
 php_value post_max_size 2M&lt;br /&gt;
&lt;br /&gt;
:The value given in these lines is 2M. You may want to change this at a later date to allow uploading of larger files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
Several hosting services that uses Apache 2 and php 5.x does not allow php flags and values to be set from within .htaccess file. It may be necessary to place a php.ini file within each sub-directory of the site :-( .&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Make one php.ini file in the main moodle directory tree and later copy it to all sub-directories. the syntax is a little bit different than the one used in .htaccess. (see sample after section 2)&lt;br /&gt;
# Run the script http://tips-scripts.com/php_ini_copy or copy php.ini manually to all sub-directories.&lt;br /&gt;
:php.ini (sample):&lt;br /&gt;
 upload_max_filesize = 2M&lt;br /&gt;
 post_max_size = 2M&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Before you go into this adventure make sure you really need those php instructions in your site.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Note&#039;&#039;&#039;: Use a .htaccess file only [http://httpd.apache.org/docs/1.3/howto/htaccess.html#when as a last resort] as it can have an impact on the performance of your Moodle site and cause pages to load slowly on your browser.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating an empty database ===&lt;br /&gt;
&lt;br /&gt;
You need to create an empty database (eg &amp;quot;&#039;&#039;moodle&#039;&#039;&amp;quot;) in your database system along with a special user (eg &amp;quot;moodleuser&amp;quot;) that has access to that database (and that database only). You could use the &amp;quot;root&amp;quot; user if you wanted to for a test server, but this is not recommended for a production system: if hackers manage to discover the password then your whole database system would be at risk, rather than just one database.&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;Warning&#039;&#039;&#039;: Bear in mind that, as of Moodle version 1.5.x, Moodle doesn&#039;t work with MySQL 5.x&#039;s strict mode setting (STRICT_TRANS_TABLES and/or STRICT_ALL_TABLES) -- see [http://moodle.org/mod/forum/discuss.php?d=58552 forum discussion]. So if you are using MySQL 5.x, edit MySQL&#039;s configuration file (called &amp;quot;my.ini&amp;quot; in Windows and &amp;quot;my.cnf&amp;quot; on Unix/Linux) and comment out that option or set it to &amp;lt;code&amp;gt;sql-mode=&#039;&#039;&amp;lt;/code&amp;gt;. You have to restart MySQL after changing this setting. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; If you do not have access to your server, use PHPMyAdmin (or another MySQL client) and enter the command &amp;lt;code&amp;gt;SET @@global.sql_mode=&#039;&#039;;&amp;lt;/code&amp;gt; (be sure to use single quotes, and don&#039;t forget the semicolon).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
====Using a hosted server====&lt;br /&gt;
If you are using a webhost, they will probably have a control panel web interface for you to create your database.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;[http://www.cpanel.com/ cPanel]&#039;&#039;&#039; system is one of the most popular of these. &lt;br /&gt;
To create a database using cPanel:&lt;br /&gt;
&lt;br /&gt;
# Click on the &#039;&#039;&#039;MySQL Databases&#039;&#039;&#039; icon.&lt;br /&gt;
# Type &#039;&#039;&#039;moodle&#039;&#039;&#039; in the New Database field and click &#039;&#039;&#039;Create Database&#039;&#039;&#039;.&lt;br /&gt;
# Type a &#039;&#039;username&#039;&#039; and &#039;&#039;password&#039;&#039; (not one you use elsewhere) in the respective fields and click &#039;&#039;&#039;Create  User&#039;&#039;&#039;.&amp;lt;br&amp;gt;Note that the &#039;&#039;username&#039;&#039; and &#039;&#039;database&#039;&#039; names may be prefixed by your cPanel account name and an underscore, and truncated to 16 characters. When entering this information into the Moodle installer - use the full names.&lt;br /&gt;
# Now use the &#039;&#039;&#039;Add Users to Databases&#039;&#039;&#039; button and give this new user account &#039;&#039;&#039;ALL&#039;&#039;&#039; rights to the new database.&lt;br /&gt;
&lt;br /&gt;
Continue with [[Installing_Moodle#CreatDataDir |Creating the data directory]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Using the command line====&lt;br /&gt;
&lt;br /&gt;
If you have access to Unix or Windows command lines then you can do the same sort of thing by typing commands. You should do this using the MySQL Client program as follows (commands which you type-in are shown in bold):&lt;br /&gt;
&lt;br /&gt;
- Start the MySQL Client program:&lt;br /&gt;
 #&#039;&#039;&#039;mysql -u root -p&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 2 to server version: 5.0.22-log&lt;br /&gt;
 &lt;br /&gt;
 Type &#039;help;&#039; or &#039;\h&#039; for help. Type &#039;\c&#039; to clear the buffer.&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- The prompt changes to &amp;quot;mysql&amp;gt;&amp;quot; to indicate that you are now working in the MySQL Client program. When working in MySQL, all commands which you type-in must end in a semi-colon. (If you hit the Enter key without the final semi-colon, you&#039;ll get the line continuation symbol &#039;-&amp;gt;&#039;; this is your second chance to type the semi-colon and hit Enter.) &lt;br /&gt;
&lt;br /&gt;
- Begin by checking for any existing databases called &amp;quot;moodle&amp;quot; - if there are any you should change the name in all the commands which follow:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;SHOW DATABASES;&#039;&#039;&#039;&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | Database                |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | information_schema      |&lt;br /&gt;
 | mysql                   |&lt;br /&gt;
 | test                    |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 3 rows in set (0.03 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a database to store the Moodle tables. We&#039;ll call this &amp;quot;moodle&amp;quot;, as there are none with that name already in the above list, but change it if you need to.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;CREATE DATABASE moodle;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Change the default character set and collation of the &amp;quot;moodle&amp;quot; database to UTF8. Leave this out if you are installing Moodle 1.5 or earlier):&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a username and password to access the database &amp;quot;moodle&amp;quot; and grant database access permissions. We&#039;ll call the user &amp;quot;moodleuser&amp;quot; and set the password as &amp;quot;yourpassword&amp;quot;. It&#039;s a good idea to change these for your installation however most people keep the username as &amp;quot;moodleuser&amp;quot;. Remember the username and password you have set, as you&#039;ll need it in the configuration screens later. This is a long command so has been split over several lines by pressing the Return key.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;DROP,INDEX,ALTER ON moodle.*&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;TO moodleuser@localhost IDENTIFIED BY &#039;yourpassword&#039;;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Security Warnings&#039;&#039;&#039;: Never leave the password as the one shown here. Make sure you have a strong password (a mixture of letters and numbers, upper and lower case). Avoid granting &amp;quot;ALL&amp;quot; permissions on the database.&lt;br /&gt;
: &#039;&#039;&#039;Note&#039;&#039;&#039;: For MySQL 4.0.1 or earlier, you don&#039;t need the CREATE TEMPORARY TABLES permission. &lt;br /&gt;
&lt;br /&gt;
- Exit the MySQL Client program:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;QUIT&#039;&#039;&#039;&lt;br /&gt;
 Bye&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
- Reload the grant tables using the mysqladmin program:&lt;br /&gt;
 #&#039;&#039;&#039;mysqladmin -u root -p reload&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
And some example command lines for PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
   # su - postgres&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create user moodleuser createdb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create database moodle &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;with encoding &#039;unicode&#039;&amp;lt;/font&amp;gt;;&amp;quot; -U moodleuser template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser nocreatedb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser with encrypted password &#039;yourpassword&#039;;&amp;quot; template1&lt;br /&gt;
   &amp;gt; su - root&lt;br /&gt;
   # /etc/init.d/postgresql reload&lt;br /&gt;
&lt;br /&gt;
If the Postgres create database command above (&amp;gt;psql -c &amp;quot;create database moodle...&amp;quot;) gives an error message you may want to try:&lt;br /&gt;
 psql -c &amp;quot;create database moodle with template=template1 encoding = &#039;unicode&#039; owner =  moodleuser &amp;lt;br&amp;gt;     location = &#039;/var/mydata&#039;;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If the create database command asks you for a password, run the line containing &#039;encrypted password&#039; first before proceeding.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
* Step-by-step instructions on  [https://docs.moodle.org/en/Step-by-step_Install_Guide_for_Ubuntu installation for Ubuntu(Debian)]&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the data directory  ===&lt;br /&gt;
&lt;br /&gt;
Moodle will also need some space on your server&#039;s hard disk to store uploaded files, such as course documents and user pictures. The Moodle installer tries hard to create the &#039;&#039;&#039;moodledata&#039;&#039;&#039; directory for you but if it fails then you will have to create a directory for this purpose manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Security warning&#039;&#039;&#039;: For security purposes, it is &#039;&#039;&#039;CRITICAL&#039;&#039;&#039; that this directory is &#039;&#039;&#039;NOT&#039;&#039;&#039; accessible directly via the web. The easiest way to do this is to simply locate it OUTSIDE the web site root directory (it is the folder that the main part of your URL -that is, the part up to the first single / - points to; for example, in &amp;lt;nowiki&amp;gt;http://your.domain.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;, it is &amp;lt;nowiki&amp;gt;http://your.domain.com/&amp;lt;/nowiki&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
But if you must have it in the web directory (and you are using Apache AND the web server configuration allows .htaccess files to restrict access to directories) then protect it by creating a file in the data directory called &#039;&#039;&#039;.htaccess&#039;&#039;&#039;, containing these lines:&lt;br /&gt;
&lt;br /&gt;
 order deny,allow&lt;br /&gt;
 deny from all&lt;br /&gt;
&lt;br /&gt;
If you are using IIS, you need to edit the properties of the data directory (from the Internet Information Services Manager console) and deny access to that folder to everybody from the web.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you don&#039;t protect the data directory from direct web access, anybody will be able to impersonate any user of your Moodle site (including the admin user!!!), and all of your course materials will be available to the web at large.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ownership &amp;amp; Permissions&#039;&#039;&#039;: To make sure that Moodle can save uploaded files in this directory, check that the web server software has permission to read, write and execute in this directory. On Unix machines, this means setting the owner of the directory to be something like &amp;quot;nobody&amp;quot; or &amp;quot;apache&amp;quot;, and then giving that user read, write and execute permissions. As an example, to change the owner to &amp;quot;nobody&amp;quot; you could use:&lt;br /&gt;
&lt;br /&gt;
 chown -R nobody:apache moodledata&lt;br /&gt;
&lt;br /&gt;
To change the permissions so that the owner has read,write and execute permissions, use something like this:&lt;br /&gt;
&lt;br /&gt;
 chmod -R 0770 moodledata&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: If you are receiving permission denied messages, try &#039;&#039;chmod -R 0770 moodledata&#039;&#039; and then adjust the settings so that they are more secure. A more secure setting is &#039;&#039;chmod -R 0750 moodledata&#039;&#039;. According to the comments in config-dist.php, &amp;quot;On hosting systems you might need to make sure that your group has no permissions at all while others have full permissions.&amp;quot; To do this you could use &#039;&#039;chmod -R 707 moodledata&#039;&#039;. See also the [[Security | security page]].&lt;br /&gt;
&lt;br /&gt;
Remember that by default moodle will issue a warning about moodle data directories created inside the web directory, but otherwise this directory can be located where you wish. You can later move or change the location of this directory, but if you do, be sure to edit the setting in the &#039;&#039;&#039;config.php&#039;&#039;&#039; file that sets this; e.g. if moodledata is under a directory called data, then it would look like this:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/data/moodledata&#039;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=background-color:lightCyan border=1 cellpadding=5 cellspacing=0 &amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CPanel and webhosts&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
On cPanel systems you can use the &amp;quot;File Manager&amp;quot; to find the folder, click on it, then choose &amp;quot;Change Permissions&amp;quot;. On many shared hosting servers, you will probably need to restrict all file access to your &amp;quot;group&amp;quot; (to prevent other webhost customers from looking at or changing your files), but provide full read/write access to everyone else (which will allow the web server to access your files). Speak to your server administrator if you are having trouble setting this up securely. In particular it will not be possible to create a usable data directory on sites that use a PHP feature known as &amp;quot;&#039;&#039;&#039;Safe Mode&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Run the installer script to create config.php ==&lt;br /&gt;
&lt;br /&gt;
To run the installer script (install.php), just try to access your Moodle main URL using a web browser, or access &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourserver/install.php&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039; directly.&lt;br /&gt;
&lt;br /&gt;
(The Installer will try to set a session cookie. If you get a popup warning in your browser make sure you accept that cookie!)&lt;br /&gt;
&lt;br /&gt;
Moodle will detect that configuration is necessary and will lead you through some screens to help you create a new configuration file called &#039;&#039;&#039;config.php&#039;&#039;&#039;. At the end of the process Moodle will try and write the file into the right location, otherwise you can press a button to download it from the installer and then upload &#039;&#039;&#039;config.php&#039;&#039;&#039; into the main Moodle directory on the server.&lt;br /&gt;
&lt;br /&gt;
Along the way the installer will test your server environment and give you suggestions about how to fix any problems. For most common issues these suggestions should be sufficient, but if you get stuck, check in the Installation Forum for more help.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Go to the admin page to continue configuration ==&lt;br /&gt;
&lt;br /&gt;
Once the basic config.php has been correctly created in the previous step, trying to access the front page of your site will take you to the &amp;quot;admin&amp;quot; page for the rest of the configuration.&lt;br /&gt;
&lt;br /&gt;
The first time you access this admin page, you will be presented with a GPL &amp;quot;shrink wrap&amp;quot; agreement with which you must agree before you can continue with the setup.&lt;br /&gt;
&lt;br /&gt;
Now Moodle will start setting up your database and creating tables to store data. Firstly, the main database tables are created. You should see a number of SQL statements followed by status messages that look like this:&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE course (&lt;br /&gt;
    id int(10) unsigned NOT NULL auto_increment,&lt;br /&gt;
    category int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    password varchar(50) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    fullname varchar(254) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    shortname varchar(15) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    summary text NOT NULL,&lt;br /&gt;
    format tinyint(4) NOT NULL default &#039;1&#039;,&lt;br /&gt;
    teacher varchar(100) NOT NULL default &#039;Teacher&#039;,&lt;br /&gt;
    startdate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    enddate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    timemodified int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    PRIMARY KEY (id)&lt;br /&gt;
 ) TYPE=MyISAM;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;SUCCESS&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and so on, followed by: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Main databases set up successfully.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see these, then there must have been some problem with the database or the configuration settings you defined in config.php. Check that PHP isn&#039;t in a restricted &amp;quot;Safe Mode&amp;quot; (commercial web hosts sometimes have safe mode turned on). You can check PHP variables by creating a little file containing &#039;&#039;&#039;&amp;lt;?php phpinfo() ?&amp;gt;&#039;&#039;&#039; and looking at it through a browser. Check all these and try this page again.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
You should now see a form where you can define more configuration variables for your installation, such as the default language, SMTP hosts and so on. Don&#039;t worry too much about getting everything right just now - you can always come back and edit these later on using the admin interface. The defaults are designed to be useful and secure for most sites. Scroll down to the bottom and click &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If (and only if) you find yourself getting stuck on this page, unable to continue, then your server probably has what I call the &amp;quot;buggy referrer&amp;quot; problem. This is easy to fix: just turn off the &amp;quot;secureforms&amp;quot; setting, then try to continue again.&lt;br /&gt;
&lt;br /&gt;
Next you will see more pages that print lots of status messages as they set up all the tables required by the various Moodle module. As before, they should all be &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;green&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
The next page is a form where you can define parameters for your Moodle site and the front page, such as the name, format, description and so on. Fill this out (you can always come back and change these later) and then press &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Finally, you will then be asked to create a top-level administration user for future access to the admin pages. Fill out the details with your own name, email etc and then click &amp;quot;Save changes&amp;quot;. Not all the fields are required, but if you miss any important fields you&#039;ll be re-prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you remember the username and password you chose for the administration user account, as they will be necessary to access the administration page in future.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(If for any reason your install is interrupted, or there is a system error of some kind that prevents you from logging in using the admin account, you can usually log in using the default username of &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;, with password &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
Once successful, you will be returned to the home page of your new site! Note the administration links that appear down the left hand side of the page (these items also appear on a separate Admin page) - these items are only visible to you because you are logged in as the admin user. All your further administration of Moodle can now be done using this menu, such as:&lt;br /&gt;
&lt;br /&gt;
* creating and deleting courses&lt;br /&gt;
* creating and editing user accounts&lt;br /&gt;
* administering teacher accounts&lt;br /&gt;
* changing site-wide settings like themes etc&lt;br /&gt;
&lt;br /&gt;
But you are not done installing yet! There is one very important thing still to do (see the next section on cron).&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Installing Moodle Using Command Line ==&lt;br /&gt;
&lt;br /&gt;
Installing Moodle Using command line is just as easy as installing Moodle using web browser. &lt;br /&gt;
* First Go to the moodle root directory and then to admin directory inside the moodle root. &lt;br /&gt;
&lt;br /&gt;
 $cd /var/www/html/moodle/admin&lt;br /&gt;
&lt;br /&gt;
* Then simply use the following syntax to run the moodle command line installer&lt;br /&gt;
 $php cliupgrade.php --lang=en --webaddr=http://www.example.com --moodledir=/var/www/html/moodle --datadir=/var/moodledata --dbtype=mysql --dbhost=localhost --dbname=moodle --dbuser=root --prefix=mdl --verbose=1 --interactivelevel=2 &lt;br /&gt;
&lt;br /&gt;
More information about the options can be found using &lt;br /&gt;
$php cliupgrad.php --help&lt;br /&gt;
&lt;br /&gt;
Then you will see the following list of available options&lt;br /&gt;
&lt;br /&gt;
 --lang		 		Valid installed language for installation. Default is English(en)&lt;br /&gt;
 --webaddr			Web address for the Moodle site&lt;br /&gt;
 --moodledir			Location of the moodle web folder&lt;br /&gt;
 --datadir			Location of the moodle data folder (should not be web visible)&lt;br /&gt;
 --dbtype			Database type. Default it mysql&lt;br /&gt;
 --dbhost			Database host. Default localhost&lt;br /&gt;
 --dbname			Database name. Default is moodle&lt;br /&gt;
 --dbuser			Database user. Default is blank&lt;br /&gt;
 --dbpass			Database password. Default is blank&lt;br /&gt;
 --prefix			        Table prefix for above database tables. Default is mdl&lt;br /&gt;
 --verbose			0 No output, 1 Summarized output(Default), 2 Detailed output&lt;br /&gt;
 --interactivelevel	        0 Non interactive, 1 Semi interactive(Default), 2 Interactive&lt;br /&gt;
 --help				print out this help&lt;br /&gt;
&lt;br /&gt;
When you choose non interactive mode without any options all the default values are assumed.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Set up cron ==&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s background tasks (e.g. sending out forum emails and performing course backups) are performed by a script which you can set to execute at specific times of the day. This is known as a cron script. Please refer to the [[Cron|Cron instructions]].&lt;br /&gt;
&lt;br /&gt;
== Set up backups ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[Backup settings| backup instructions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Create a new course ==&lt;br /&gt;
&lt;br /&gt;
Now that Moodle is running properly, you can try creating a new course to play with.&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Create a new course&amp;quot; from the Admin page (or the admin links on the home page).&lt;br /&gt;
&lt;br /&gt;
Fill out the form, paying special attention to the course format. You don&#039;t have to worry about the details too much at this stage, as everything can be changed later by the teacher. Note that the yellow help icons are everywhere to provide contextual help on any aspect.&lt;br /&gt;
&lt;br /&gt;
Press &amp;quot;Save changes&amp;quot;, and you will be taken to a new form where you can assign teachers to the course. You can only add existing user accounts from this form - if you want to create a new teacher account then either ask the teacher to create one for themselves (see the login page), or create one for them using the &amp;quot;Add a new user&amp;quot; on the Admin page.&lt;br /&gt;
&lt;br /&gt;
Once done, the course is ready to customize, and is accessible via the &amp;quot;Courses&amp;quot; link on the home page.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Installation FAQ]]&lt;br /&gt;
* [[Complete install packages]] might be an easier first time installs on some systems&lt;br /&gt;
* Help forum:  [http://moodle.org/mod/forum/view.php?id=28 Installation problems]&lt;br /&gt;
* [[Installing Apache, MySQL and PHP]] - Open source programs that can run Moodle on the web or on a desktop&lt;br /&gt;
* [[Upgrading Moodle]]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=42688 Selecting a web host for Moodle] forum discussion&lt;br /&gt;
* [[masquerading|Masquerading]] - Running Moodle behind a masquerading/NAT firewall&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[cs:Instalace]]&lt;br /&gt;
[[de:Installieren von Moodle]]&lt;br /&gt;
[[es:Instalación de moodle]]&lt;br /&gt;
[[fr:Installation de Moodle]]&lt;br /&gt;
[[ja:Moodleのインストール]]&lt;br /&gt;
[[nl:Installatiegids]]&lt;br /&gt;
[[pl:Instalacja Moodle]]&lt;br /&gt;
[[pt:Instalação do Moodle]]&lt;br /&gt;
[[ru:Установка Moodle]]&lt;br /&gt;
[[sk:Inštalácia]]&lt;br /&gt;
[[zh:安装Moodlezh:]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Upgrading_to_Moodle_1.9&amp;diff=39182</id>
		<title>Talk:Upgrading to Moodle 1.9</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Upgrading_to_Moodle_1.9&amp;diff=39182"/>
		<updated>2008-07-04T22:33:46Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: New page: ==Regarding Section 1== Since Moodlers upgrading from 1.6 or below are supposed to skip 1.7, should we really be telling them to read Upgrading to Moodle 1.7? ~~~~ ==Regarding Section 1.1=...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Regarding Section 1==&lt;br /&gt;
Since Moodlers upgrading from 1.6 or below are supposed to skip 1.7, should we really be telling them to read Upgrading to Moodle 1.7? [[User:Richard Enison|Richard Enison]] 17:33, 4 July 2008 (CDT)&lt;br /&gt;
==Regarding Section 1.1==&lt;br /&gt;
In the third bullet item, &amp;quot;you must have at least PHP 4.0.16&amp;quot;? Moodle 1.6 is supposed to require PHP 4.3.0 or later according to https://docs.moodle.org/en/Installing_Moodle#Requirements. I think someone is confused by MySQL 4.1.16, which is required for non-Latin language characters. [[User:Richard Enison|Richard Enison]] 17:33, 4 July 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Installing_MSSQL_for_PHP&amp;diff=37223</id>
		<title>Talk:Installing MSSQL for PHP</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Installing_MSSQL_for_PHP&amp;diff=37223"/>
		<updated>2008-06-09T12:45:42Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: config.php parameters for odbtp&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Are the ODBTP instructions for ODBTP.conf incorrect? According to moodle forum[http://moodle.org/mod/forum/discuss.php?d=59284&amp;amp;parent=270285], the ODBTP.conf must point to the host of the ODBTP service, not the MSSQL server.&lt;br /&gt;
&lt;br /&gt;
I can only verify this for Windows, no idea about unix.&lt;br /&gt;
&lt;br /&gt;
:Hi Ben, I&#039;ve updated the documentation. All my tests were/are with both the ODBTP service + the MSSQL server in the same host so I never had that problem. Thanks for pointing to it! [[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 09:50, 16 July 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
Also, unlike the other methods described in this article, we are not given a clue as to what to put for the $CFG-&amp;gt;db... parameters in config.php, especially $CFG-&amp;gt;dbtype. --[[User:Richard Enison|Richard Enison]] 07:45, 9 June 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installing_MSSQL_for_PHP&amp;diff=37222</id>
		<title>Installing MSSQL for PHP</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installing_MSSQL_for_PHP&amp;diff=37222"/>
		<updated>2008-06-09T12:35:42Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Introduction */  grammar and punctuation corrections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.7}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This short manual is suitable if you are trying to run Moodle 1.7 (and upwards) using the SQL*Server (MSSQL) RDBMS. Steps detailed below must be performed &#039;&#039;&#039;before&#039;&#039;&#039; installing Moodle itself.&lt;br /&gt;
&lt;br /&gt;
First of all, minimum required version of MSSQL has been stabilised to MSSQL 2005 (v.9), although it &#039;&#039;&#039;might work with MSSQL 2000 (v.8) or newer&#039;&#039;&#039;. All the development process has been performed using MSSQL 2005 and there could be some &#039;&#039;&#039;unknown problems&#039;&#039;&#039; with previous releases.&lt;br /&gt;
&lt;br /&gt;
While PHP comes with one, more or less, standard extension (mssql) that provides access to MSSQL databases, early we found some hard limits on it. Basically such default extension has some limits that prevent us to use it at all (you can find more info about these problems [[Development:XMLDB problems#MSSQL, PHP, UTF-8 and UCS-2|here]]).&lt;br /&gt;
&lt;br /&gt;
So, in order to allow PHP (i.e. Moodle) to access to MSSQL DBs properly we have to install a &#039;&#039;&#039;mssql extension alternative&#039;&#039;&#039; to save us from the problems related above. See the sections below for details about the various options.&lt;br /&gt;
&lt;br /&gt;
== Installation overview ==&lt;br /&gt;
&lt;br /&gt;
1. Get MSSQL Server installed and running. ([http://www.microsoft.com/sql/editions/express/default.mspx A free limited version, SQL Server Express Edition] is available for testing.)&lt;br /&gt;
:Make sure that you choose mixed authentication (Windows and local accounts) to keep things simpler later.  You&#039;ll be asked to define the  &amp;quot;sa&amp;quot; account password (it&#039;s the default System Administrator account which has full access to all databases by default).&lt;br /&gt;
&lt;br /&gt;
2. Make sure MS SQL Server can accept incoming TCP/IP connections on port 1433 (the standard one).&lt;br /&gt;
:You might need to explicitly allow this in your Windows firewall (see the Control Panel).  You may also need to edit options in the :&#039;&#039;&#039;SQL Server Configuration Manager&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Network Configuration&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Protocols&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;TCP/IP enabled&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
3. Open the &amp;quot;SQL Server Management Studio&amp;quot; and create a new empty database.  If you are using the &amp;quot;sa&amp;quot; account then you don&#039;t need to do anything else here.&lt;br /&gt;
&lt;br /&gt;
4. Configure these settings in your created (and still empty) database:&lt;br /&gt;
&lt;br /&gt;
:* ANSI NULLS Enabled = true&lt;br /&gt;
:* Quoted Identifiers Enabled = true&lt;br /&gt;
&lt;br /&gt;
5. Get PHP installed with a web server.   Unless you want to do it under IIS or some other way, the packages on the [http://download.moodle.org Moodle download page] are a good solution.&lt;br /&gt;
&lt;br /&gt;
6. Choose one of the following specific sections for your server to install the &#039;&#039;&#039;mssql extension alternative&#039;&#039;&#039; installed and running properly on your PHP box.&lt;br /&gt;
&lt;br /&gt;
7. Set the following settings in your php.ini file&lt;br /&gt;
:* mssql.textlimit = 20971520&lt;br /&gt;
:* mssql.textsize = 20971520&lt;br /&gt;
:Also, don&#039;t forget to set one of the following &#039;&#039;&#039;alternatives&#039;&#039;&#039;, in order to get all the data properly &amp;quot;slashed&amp;quot;:&lt;br /&gt;
:* magic_quotes_gpc = Off  &#039;&#039;&#039;or&#039;&#039;&#039;&lt;br /&gt;
:* magic_quotes_gpc = On &#039;&#039;&#039;and&#039;&#039;&#039; magic_quotes_sybase = On &lt;br /&gt;
&lt;br /&gt;
8. With all this properly configured, you can continue with a [[Installing Moodle|standard Moodle installation]].&lt;br /&gt;
&lt;br /&gt;
== Using FreeTDS on Unix ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Important Note 1:&#039;&#039;&#039; Due to [http://bugs.php.net/bug.php?id=39213 one bug in PHP] it&#039;s highly recommendable to use PHP &amp;gt; 5.1.6 with FreeTDS ([http://tracker.moodle.org/browse/MDL-11810 more info]).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Important Note 2:&#039;&#039;&#039; Due to one bug in how FreeTDS handles nulls and empty values for some text types it&#039;s highly recommendable to use a recent version of FreeTDS (0.64 + official patches) ([http://tracker.moodle.org/browse/MDL-11810#action_38005 more info]).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you web server is on Linux or some other flavour of Unix, try FreeTDS, http://www.freetds.org (documentation at http://www.freetds.org/docs.html)&lt;br /&gt;
&lt;br /&gt;
Note that the download link above is a &#039;&#039;&#039;source download&#039;&#039;&#039;, so you will need to install and compile it properly.&lt;br /&gt;
&lt;br /&gt;
Once downloaded and uncompressed you must &#039;&#039;&#039;&amp;quot;configure, make, make install&amp;quot;&#039;&#039;&#039; it. This will deploy some stuff in the &amp;quot;/usr/local&amp;quot; directory of your machine, mainly:&lt;br /&gt;
* /usr/local/etc: where the freetds conf files will reside.&lt;br /&gt;
* /usr/local/lib: where compiled libraries will reside.&lt;br /&gt;
* /usr/local/bin: where some executables will reside.&lt;br /&gt;
&lt;br /&gt;
Then, you must configure FreeTDS to point to your MSSQL DB server. To do so, edit (or create) the /usr/local/etc/freetds.conf file and put in there exclusively these lines:&lt;br /&gt;
&lt;br /&gt;
  [global]&lt;br /&gt;
      host = xxx.xxx.xxx.xxx (ip of the MSSQL server)&lt;br /&gt;
      port = 1433&lt;br /&gt;
      client charset = UTF-8&lt;br /&gt;
      tds version = 7.0&lt;br /&gt;
      text size = 20971520&lt;br /&gt;
&lt;br /&gt;
At this point, and previously to build the &#039;&#039;&#039;mssql extension alternative&#039;&#039;&#039;, you can test conectivity with your MSSQL DB using the &amp;quot;/usr/local/bin/tsql&amp;quot; executable. Just do this:&lt;br /&gt;
&lt;br /&gt;
  tsql -S serverhost -U dbowner -P dbpassword&lt;br /&gt;
&lt;br /&gt;
If everything is ok, you&#039;ll get this output:&lt;br /&gt;
&lt;br /&gt;
  locale is &amp;quot;es_ES.UTF-8&amp;quot;&lt;br /&gt;
  locale charset is &amp;quot;UTF-8&amp;quot;&lt;br /&gt;
  1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
just type, for example:&lt;br /&gt;
&lt;br /&gt;
  sp_help sysobjects&lt;br /&gt;
&lt;br /&gt;
and you might get some output from DB. Finally type:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
and you&#039;ll be out from the &amp;quot;tsql&amp;quot; command line interpreter.&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve successfully built, configured and tested FreeTDS it is time to create the &#039;&#039;&#039;mssql extension alternative&#039;&#039;&#039; that will provide us with the capacity of handling MSSQL DBs from within Moodle. To do so, you&#039;ll need configure your PHP server adding this new option to the usual ones:&lt;br /&gt;
&lt;br /&gt;
  --with-mssql=/usr/local/ &lt;br /&gt;
&lt;br /&gt;
then, after the standard &amp;quot;make and make install&amp;quot; steps, your PHP server will be built with MSSQL support provided by FreeTDS.&lt;br /&gt;
&lt;br /&gt;
Finally, configure your Moodle config.php with this DB related info and continue with a normal Moodle install:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mssql_n&#039;;         // Required&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;xxx.xxx.xxx.xxx&#039;; // IP of the MSSQL server (also proper hostname is allowed)&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle&#039;;          // or whatever you called the database you created&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;yourusername&#039;;    // I usually use the &#039;sa&#039; account (dbowner perms are enough)&lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;yourpassword&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;            //Prefix, you can change it, but &#039;&#039;&#039;never&#039;&#039;&#039; leave it blank.&lt;br /&gt;
&lt;br /&gt;
== Using FreeTDS on Windows ==&lt;br /&gt;
&lt;br /&gt;
If your web server is on Windows, use &#039;&#039;&#039;php_dblib.dll&#039;&#039;&#039; from Frank Kromann ([http://kromann.info/article.php?Id=11062598797760000 original details here]). Despite the name, it&#039;s FreeTDS compiled for Windows.  Many thanks to Frank for providing this DLL.  Here&#039;s how to set it up:&lt;br /&gt;
&lt;br /&gt;
1. Download the appropriate copy of php_dblib.dll from the list below, and save it into your /PHP/ext directory. (php_dblib.dll does not appear to be available for PHP 4.x at this time.)  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://kromann.info/php5_1-Release_TS/php_dblib.dll php_dblib.dll for PHP 5.1.x]&lt;br /&gt;
&lt;br /&gt;
[http://kromann.info/php5_2-Release_TS/php_dblib.dll php_dblib.dll for PHP 5.2.x]&lt;br /&gt;
&lt;br /&gt;
[http://kromann.info/php6-Release_TS/php_dblib.dll php_dblib.dll for PHP 6.x]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. FreeTDS requires the .NET Framework v1.1 to be installed.  You can [http://www.microsoft.com/downloads/details.aspx?FamilyID=262d25e3-f589-4842-8157-034d1e7cf3a3&amp;amp;DisplayLang=en download it from the Microsoft website] along with its [http://www.microsoft.com/downloads/details.aspx?FamilyID=a8f5654f-088e-40b2-bbdb-a83353618b38&amp;amp;DisplayLang=en service pack].  Alternatively, if you do not wish to install this framework, you can [http://kromann.info/ms-libs/msvcr71.dll download the required DLL] from Frank&#039;s site, and save it into your /PHP root directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Edit your /PHP/php.ini file and add this line:&lt;br /&gt;
&lt;br /&gt;
  extension=php_dblib.dll &lt;br /&gt;
&lt;br /&gt;
Make sure that any lines referring to the php_mssql.dll extension are DISABLED (commented out).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Create a file called C:\freetds.conf with:&lt;br /&gt;
&lt;br /&gt;
  [global]&lt;br /&gt;
      host = xxx.xxx.xxx.xxx (ip of the MSSQL server)&lt;br /&gt;
      port = 1433&lt;br /&gt;
      client charset = UTF-8&lt;br /&gt;
      tds version = 7.0&lt;br /&gt;
      text size = 20971520&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Your Moodle config.php should include lines like these:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mssql_n&#039;;        // Required&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;      // assuming MS SQL is on the same server, otherwise use an IP&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle&#039;;         // or whatever you called the database you created&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;yourusername&#039;;   // I usually use the &#039;sa&#039; account (dbowner perms are enough)&lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;yourpassword&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;            //Prefix, you can change it, but &#039;&#039;&#039;never&#039;&#039;&#039; leave it blank.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have a config.php file yet, it can be generated as normal from the Moodle installer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Restart or start your web server.  If Moodle still cannot communicate with the database server, please turn display_startup_errors to &amp;quot;On&amp;quot; in your /PHP/php.ini file, then restart the web server and check for any errors that may indicate incorrect DLL versions or missing dependencies.  These error reports, turned off by default in PHP, can be vital in locating a problem with new extension installations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Install Moodle as usual.  Good luck!&lt;br /&gt;
&lt;br /&gt;
== Using ODBTP on Unix or Windows ==&lt;br /&gt;
&lt;br /&gt;
You can download ODBTP from http://odbtp.sourceforge.net/. Also you will access to the documentation from the same page.&lt;br /&gt;
&lt;br /&gt;
The downloaded package includes both the source code and some binaries to be installed in the server and some ready-to-use &#039;&#039;&#039;mssql extension alternatives&#039;&#039;&#039; for some platforms/PHP versions (so you won&#039;t need to compile it if your PHP server/version binary package is present).&lt;br /&gt;
&lt;br /&gt;
First of all, we have to install the Win32 service that comes with the package. Let&#039;s assume that it&#039;s going to run in the same Win32 machine where your MSSQL server is running (although it can run in any other Win32 server in your network).&lt;br /&gt;
&lt;br /&gt;
To do do, following the instructions present in http://odbtp.sourceforge.net/install.html, you must:&lt;br /&gt;
&lt;br /&gt;
# Create a directory on the Windows host where the service program files will reside, i.e., md odbtp.&lt;br /&gt;
# Copy the files odbtpctl.exe, odbtpsrv.exe and odbtpsrv.ini files from the winservice directory into the directory created in step 1.&lt;br /&gt;
# Edit the file odbtpsrv.ini of the previous step and this line: &amp;lt;pre&amp;gt;MaxRequestSize=20971520&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Open a command prompt (cmd) window on the Windows host.&lt;br /&gt;
# Change to the directory to which the service program files were copied, i.e., cd odbtp.&lt;br /&gt;
# Run the following commands to install and start the service:&lt;br /&gt;
#*   odbtpctl install&lt;br /&gt;
#*   odbtpctl start&lt;br /&gt;
# With these steps you should have one new service running in your host called &amp;quot;odbtp&amp;quot;. Verify it&#039;s present and running in the &amp;quot;Services&amp;quot; control panel.&lt;br /&gt;
# Don&#039;t forget to enable TCP/IP incoming connections to port 2799 in the host you have installed the service!&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to build the &#039;&#039;&#039;mssql extension alternative&#039;&#039;&#039;. First of all, verify if, in the downloaded package, under the &amp;quot;php&amp;quot; dir, there is one extension suitable for your PHP server/version. If it&#039;s present, you can simply copy it to the php/extensions dir in your PHP server and skip next points about compiling it from source. It&#039;s important to point that, inside each directory, you&#039;ll find &#039;&#039;&#039;two different&#039;&#039;&#039; libraries/dll files. The one that must be copied to the extensions dir is the one called &#039;&#039;&#039;&amp;quot;php_odbtp_mssql.xxx&amp;quot;&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
If in the downloaded package isn&#039;t present the extension matching your PHP platform/version, you should build if from source files. To do that, just &#039;&#039;&#039;&amp;quot;configure, make, make install&amp;quot;&#039;&#039;&#039;. That will create some stuff under &amp;quot;/usr/local&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve successfully built ODBTP is time to create the &#039;&#039;&#039;mssql extension alternative&#039;&#039;&#039; that will provide us with the capacity of handling MSSQL DBs from within Moodle. To do so, just configure your PHP server adding this new option to the usual ones:&lt;br /&gt;
&lt;br /&gt;
  --with-odbtp-mssql&lt;br /&gt;
&lt;br /&gt;
then, after the standard &amp;quot;make and make install&amp;quot; steps, your PHP server will be built with MSSQL support provided by ODBTP.&lt;br /&gt;
&lt;br /&gt;
Finally, independently if we are using the binary extension provided in the download or if you have built it from source files, it&#039;s time to configure the extension. To do so, add this lines, if no present, to your php.ini file:&lt;br /&gt;
&lt;br /&gt;
  extension=php_odbtp.dll&lt;br /&gt;
&lt;br /&gt;
(only for Win32 PHP servers!)&lt;br /&gt;
&lt;br /&gt;
And, for all the server platforms: &lt;br /&gt;
&lt;br /&gt;
  [odbtp]&lt;br /&gt;
  odbtp.interface_file = &amp;quot;/path/to/your/odbtp.conf&amp;quot;&lt;br /&gt;
  odbtp.datetime_format = mdyhmsf&lt;br /&gt;
  odbtp.detach_default_queries = yes&lt;br /&gt;
&lt;br /&gt;
(where &#039;&#039;/path/to/your/odbtp.conf&amp;quot; is usually &amp;quot;/usr/local/etc/odbtp.conf&amp;quot;&amp;quot; for Unix systems and &amp;quot;C:\odbtp\odbtp.conf&amp;quot; for Windows systems)&lt;br /&gt;
&lt;br /&gt;
Then, edit such &amp;quot;odbtp.conf&amp;quot; file and put there these contents:&lt;br /&gt;
&lt;br /&gt;
  [global]&lt;br /&gt;
  odbtp host = xxx.xxx.xxx (ip or hostname of the Win32 box running the ODBTP service)&lt;br /&gt;
  type = mssql&lt;br /&gt;
  unicode sql = yes&lt;br /&gt;
  use row cache = yes&lt;br /&gt;
  right trim text = yes&lt;br /&gt;
  var data size = 20971520&lt;br /&gt;
&lt;br /&gt;
With this, your PHP server will be able to connect with the MSSQL DB server using ODBTP. From here, just continue with the installation.&lt;br /&gt;
&lt;br /&gt;
Finally, if you find the ODBTP executables and &#039;&#039;&#039;mssql extension alternative&#039;&#039;&#039; in binary formats, it only will be necessary to install them in your server (binary packages...) without the need to recompile anything (just the php.ini and odbtp.conf edition steps above will be necessary). Of course, it will be really welcome to have all those binary alternatives documented here.&lt;br /&gt;
&lt;br /&gt;
== Using ODBC on Windows ==&lt;br /&gt;
&lt;br /&gt;
{{Not for production sites}}&lt;br /&gt;
&lt;br /&gt;
1. Go to the &#039;&#039;&#039;Administrative Tools&#039;&#039;&#039;  control panel, then the &#039;&#039;&#039;Data Sources (ODBC)&#039;&#039;&#039; panel.&lt;br /&gt;
&lt;br /&gt;
2. Configure one new System/User DSN (call it, for example &amp;quot;moodle&amp;quot;). Dont forget to enable these options if the driver asks for them:&lt;br /&gt;
&lt;br /&gt;
:* ANSI NULLS Enabled = true&lt;br /&gt;
:* Quoted Identifiers Enabled = true&lt;br /&gt;
&lt;br /&gt;
3. Your Moodle config.php should include lines like these:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;odbc_mssql&#039;;     // Note this is different to all the other configs on this page!&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;moodle&#039;;         // Where this matches the Data source name you chose above&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;&#039;&#039;&#039;&#039;&#039;&#039;;               // Keep it blank!!&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;yourusername&#039;;   // I usually use the &#039;sa&#039; account (dbowner perms are enough)&lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;yourpassword&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;            //Prefix, you can change it, but &#039;&#039;&#039;never&#039;&#039;&#039; leave it blank.&lt;br /&gt;
&lt;br /&gt;
4. Install Moodle as usual.  Good luck!&lt;br /&gt;
&lt;br /&gt;
== Related links ==&lt;br /&gt;
&lt;br /&gt;
[[Installing Oracle for PHP]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:XMLDB]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Flash_module&amp;diff=37093</id>
		<title>Talk:Flash module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Flash_module&amp;diff=37093"/>
		<updated>2008-06-06T10:03:06Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: Tutorial Zip File&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, I&#039;m new to Moodle but a fairly experienced ActionScript developer, both 20. and 3.0.&lt;br /&gt;
&lt;br /&gt;
Looking at your code:&lt;br /&gt;
&lt;br /&gt;
score = yourScoreVariable;&lt;br /&gt;
&lt;br /&gt;
answers = yourAnswersVariable;&lt;br /&gt;
&lt;br /&gt;
startTime = getTimer();&lt;br /&gt;
&lt;br /&gt;
_root.finishButton.onRelease = function() {&lt;br /&gt;
&lt;br /&gt;
endTime = getTimer() - startTime;&lt;br /&gt;
&lt;br /&gt;
moodleService.send_response(answers, endTime, score);&lt;br /&gt;
&lt;br /&gt;
moodleService.cleanUp();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
moodleService.init();&lt;br /&gt;
&lt;br /&gt;
Could you tell us a bit more about this code?&lt;br /&gt;
&lt;br /&gt;
== Tutorial Zip File ==&lt;br /&gt;
&lt;br /&gt;
The first of the three doubly-indented items in the last section (as of this writing) on this page is highly misleading. The first post in each of the two forum threads that constitute the two parts of the tutorial has an attachment, a zip file. These are appropriately named tutorial1.zip and tutorial2.zip. They contain sample files to be used in going through the tutorial. The zip file link on this page is just a link to tutorial1.zip, not the tutorial itself in a zip file as the text says it is. --[[User:Richard Enison|Richard Enison]] 05:03, 6 June 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Installing_AMP&amp;diff=36932</id>
		<title>Talk:Installing AMP</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Installing_AMP&amp;diff=36932"/>
		<updated>2008-06-01T11:11:35Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Unhappy Installer Windows XP */  added comment about Moodle.exe&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== More windows local host comments ==&lt;br /&gt;
I will be on holiday-vacation off and on for next 3 weeks and will not have time to do another fresh install.  I feel bad for those who are frustrated.   &lt;br /&gt;
&lt;br /&gt;
I believe the Windows instructions need to include a setup mysql bat file and perhaps same for xammp .   My machine already had two version of Moodle on it in their own folders.  Bet a clean install does not have c:\windows\mysql.ini file .  Sorry I can not check it out futher for a couple of weeks.--[[User:chris collman|chris collman]] 20:01, 2 August 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Alternative Windows Intructions ==&lt;br /&gt;
Needs formating and double checking. &lt;br /&gt;
This came from this thread [http://moodle.org/mod/forum/discuss.php?d=49491 Installing Moodle 1.6 on an XP machine.]  &lt;br /&gt;
&lt;br /&gt;
 install moodle locally:&lt;br /&gt;
&lt;br /&gt;
   1. Download the complete file. Chris notes not correct file but http://download.moodle.org/download.php/windows/MoodleWindowsInstaller-latest-15.zip&lt;br /&gt;
   2. Create a folder on you hard drive (e.g. moodlelocal) and unpack it to this folder&lt;br /&gt;
   3. Change to the moodle directory created in the moodlelocal folder&lt;br /&gt;
   4. Run setup_xampp.bat and follow the instructions (should only take a minute)&lt;br /&gt;
   5. Run apache_start.bat and leave running (if asked by Windows choose “unblock”)&lt;br /&gt;
   6. Run mysql_start.bat and leave running (if asked by Windows choose “unblock”)&lt;br /&gt;
   7. Open your internet browser and enter http://localhost/&lt;br /&gt;
   8. Moodle install pages&lt;br /&gt;
         1. Moodle Windows Installer - choose next&lt;br /&gt;
         2. Checking your PHP settings – choose next&lt;br /&gt;
         3. Please confirm the locations of this Moodle installation – leave defaults and choose next&lt;br /&gt;
         4. Now you need to configure the database - leave defaults and choose next&lt;br /&gt;
         5. Checking your environment – choose next&lt;br /&gt;
         6. Configuration complete – choose continue&lt;br /&gt;
         7. Copyright notice – choose yes&lt;br /&gt;
         8. Setting up database – choose continue at bottom of the screen&lt;br /&gt;
         9. Current version – choose continue&lt;br /&gt;
        10. Release notes – choose continue&lt;br /&gt;
        11. Variables – can leave defaults and choose save changes (these can be changed later)&lt;br /&gt;
        12. Assignment - choose continue at bottom of the screen&lt;br /&gt;
        13. Upgrading database - choose continue at bottom of the screen&lt;br /&gt;
        14. Upgrading database - choose continue at bottom of the screen&lt;br /&gt;
        15. Setting up blocks - choose continue at bottom of the screen&lt;br /&gt;
        16. Setting up modules - choose continue at bottom of the screen&lt;br /&gt;
        17. Site settings – (can always change latter)&lt;br /&gt;
i.      Full site name – eg. moodle test&lt;br /&gt;
ii.      Short name – moodle 1.5.3&lt;br /&gt;
ii.      Front page description – moodle test&lt;br /&gt;
iv.      Choose save changes at bottom&lt;br /&gt;
        18. On this page you should configure your main administrator account - (can always change latter) - COMPLETE&lt;br /&gt;
i.      New password&lt;br /&gt;
ii.      Email address&lt;br /&gt;
iii.      City/town&lt;br /&gt;
iv.      Country&lt;br /&gt;
v.      Choose update profile&lt;br /&gt;
That should do it.&lt;br /&gt;
When you are done using moodle locally&lt;br /&gt;
   1. Change to the moodle directory created in the moodlelocal folder&lt;br /&gt;
   2. Run mysql_stop.bat&lt;br /&gt;
   3. Run apache_stop.bat&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
== Unhappy Installer Windows XP ==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;7. This will start the Moodle Install process, &#039;&#039;&#039;see elsewhere for detail instructions&#039;&#039;&#039;. This can take some time for a new user. Don&#039;t panic, you can change things later and the install process will tell you what you absolutely have to fill in or correct.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;see elsewhere for detail instructions ?&#039;&#039;&#039; - Now that&#039;s what I call helpful. How about a link to this mysterious &amp;quot;elswhere&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The instructions don&#039;t work.&lt;br /&gt;
Apache never started.&lt;br /&gt;
&amp;quot;Diese Eingabeforderung nicht waehrend des Running beenden&lt;br /&gt;
Bitte erst bei einem gewollten Shutdown schliessen&lt;br /&gt;
Please close this command only for Shutdown&lt;br /&gt;
Apache 2 is starting ...&lt;br /&gt;
(OS 10048)Only one usage of each socket address (protocol/network address/port)&lt;br /&gt;
is normally permitted.  : make_sock: could not bind to address 0.0.0.0:80&lt;br /&gt;
no listening sockets available, shutting down&lt;br /&gt;
Unable to open logs&lt;br /&gt;
&lt;br /&gt;
Apache konnte nicht gestartet werden&lt;br /&gt;
Apache could not be started&lt;br /&gt;
Press any key to continue . . .&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I give up for now...&lt;br /&gt;
 &lt;br /&gt;
---&lt;br /&gt;
Re Elsewhere.  Got called away and never went back to put the install moodle link.  Thanks for putting in the link.--[[User:chris collman|chris collman]] 01:04, 30 July 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I am sorry it did not work for you.  I used these instructions on two different machines and they worked.  There is a chance I didn&#039;t follow my own instructions exactly.  I was able to duplicate your error message and have a possible solution.&lt;br /&gt;
&lt;br /&gt;
I was able to get your error message when I got my localhost Moodle (1.5.3) running (it has its own folder and own apache and mysql), then tried to get my Moodle (v 1.6.1 in c:\xampplite) to run at the same time by using either &amp;quot;start_apache&amp;quot; or &amp;quot;start_xampp&amp;quot; commands.  0.0.0.0.0:80 error which I think means Apache is already running and it is not going to run it again.  Solution: run stop_apache and try it again.   I don&#039;t know what else you have on your computer, mine are pretty plain so I don&#039;t need to worry about a local wikipedia (for example) running while I use my local Moodle.   &lt;br /&gt;
&lt;br /&gt;
I recognized the error message from when I first installed Moodle and later when I first had two version of moodle. I got really frustrated. I found rebooting my computer sometimes got me past that error message.  That is the long way of stopping all instances of Apache on a machine. --[[User:chris collman|chris collman]] 01:04, 30 July 2006 (WST)  :)&lt;br /&gt;
&lt;br /&gt;
CC, I have four versions of this Xampplite Moodle on my PC from 1.7 to 1.8.3 and none of them has a start_xampp.bat or restart_xampp.bat file. The closest thing to them are the xampp_start.exe and xampp_restart.exe files, which btw don&#039;t work for me. I use the &amp;quot;still fast&amp;quot; method, which works just fine, except that I do it in the other order: I start mysql first, then apache. Because a lot of times I just want to mess with the db and don&#039;t need apache running. However, it seems that every time I install a new version, after I boot up I find mysql (but not apache) running already as a service, which is OK but I never asked for it to do that. Anyway, I was just editing the Windows section of this page but I didn&#039;t change the part about the non-existent bat files because I wanted to get your reaction first. --[[User:Richard Enison|Richard Enison]] 03:00, 23 November 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
I would add that I also don&#039;t have Moodle.exe or Start Moodle.exe, which are mentioned as the first thing to run by the article itself, section Windows, instruction #4. --[[User:Richard Enison|Richard Enison]] 06:11, 1 June 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:error/admin/unicoderequired&amp;diff=36769</id>
		<title>Talk:error/admin/unicoderequired</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:error/admin/unicoderequired&amp;diff=36769"/>
		<updated>2008-05-26T11:03:40Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: What&amp;#039;s the deal with this page?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Does a page like this really belong in the docs? I see it was created Sep. 5, 2007 and has never been edited; no pages link to it. I discovered it because someone reported in a forum post that he ran an upgrade of Moodle and it hung with a link to this page ([http://moodle.org/mod/forum/discuss.php?d=97987#p432748]). How did that happen? --[[User:Richard Enison|Richard Enison]] 06:03, 26 May 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Step-by-step_Install_Guide_for_Ubuntu&amp;diff=35676</id>
		<title>Talk:Step-by-step Install Guide for Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Step-by-step_Install_Guide_for_Ubuntu&amp;diff=35676"/>
		<updated>2008-05-06T19:59:09Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: On 2.6 Install Moodle&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I hope this shows how easy it is to setup an Ubuntu Moodle test server.  &lt;br /&gt;
I&#039;ll be adding more to this page as time progresses.&lt;br /&gt;
&lt;br /&gt;
[[User:Mikel Stous|Mikel Stous]] 00:01, 24 January 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
I just spent 2 days trying to make moodle work with edubuntu gutsy.&lt;br /&gt;
The package comes on the install CD, but after installing from synaptic all I got at the &lt;br /&gt;
http://localhost/moodle/admin screen was a blank page.&lt;br /&gt;
The secret is, after installing edubuntu, to configure a standard LAMP server. &lt;br /&gt;
I did it like this:&lt;br /&gt;
&lt;br /&gt;
launch aptitude&lt;br /&gt;
&lt;br /&gt;
sudo aptitude&lt;br /&gt;
&lt;br /&gt;
from a command line. Use the navigation arrows to tasks, hit enter, navigate to LAMP server, &lt;br /&gt;
hit + g g .&lt;br /&gt;
&lt;br /&gt;
It will download a whole lot of extra packages and when you go to http://localhost/moodle/admin&lt;br /&gt;
all will be well.&lt;br /&gt;
--[[User:Quinton Reissmann|Quinton Reissmann]] 04:42, 16 November 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
There might be some problems here.  &lt;br /&gt;
&lt;br /&gt;
They are pretty out of date.  If you are using Gutsy, run &amp;quot;sudo tasksel&amp;quot; to install the LAMP server stuff.&lt;br /&gt;
&lt;br /&gt;
Also, I think people should make a mysql user and database just for moodle instead of using the root mysql password.  Your instructions also grant access to the moodle database for all mysql users.&lt;br /&gt;
Really it&#039;s just easiest to use phpmyadmin to configure mysql.&lt;br /&gt;
&lt;br /&gt;
In phpmyadmin, just click on Privileges, then create a new user with a name like &#039;moodledatabase&#039;, and check &#039;create a database with the same name.&#039;&lt;br /&gt;
&lt;br /&gt;
Also, the instructions say &amp;quot;replace /var/www/ with /var/www/moodle/&amp;quot; in the apache conf files.  That&#039;s only necessary if you want moodle to be the default homepage for your website.&lt;br /&gt;
&lt;br /&gt;
The easiest way to have the correct php settings is to run this command:&lt;br /&gt;
&lt;br /&gt;
sudo cp /usr/share/doc/php5-common/examples/php.ini-recommended  /etc/php5/apache2/php.ini&lt;br /&gt;
&lt;br /&gt;
People using the moodle package from ubuntu realize it is months out of date and may have bugs.  For example, the current package doesn&#039;t include php5-ldap when you install it.&lt;br /&gt;
&lt;br /&gt;
Also the instructions here forget about the configuring part, and the part about setting up Cron, see:&lt;br /&gt;
https://docs.moodle.org/en/Installation_Quickstart&lt;br /&gt;
https://docs.moodle.org/en/Installing_Moodle&lt;br /&gt;
https://docs.moodle.org/en/Cron&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&lt;br /&gt;
#  Go to http://yourserver/install.php or http://yourserver/subfolders/install.php to start the installation&lt;br /&gt;
# Download the config.php file from your webserver and place in the moodle root if prompted &amp;quot;&lt;br /&gt;
&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Lastly, there&#039;s no mention in the docs, but you either need to install a mail server, or go to Site Administration-&amp;gt;Server-&amp;gt;Email and put in info about an outside smtp server to use, otherwise no one will be able to login to your site (if you have email-based registration).&lt;br /&gt;
&lt;br /&gt;
Instead of command line mysql administration you could phpmyadmin. I will write a guide in the followink days how to install and configure phpmyadmin and create a moodle db.(KOS), March. 20, 2008 - Moodlerooms Assignment)&lt;br /&gt;
&lt;br /&gt;
== On 2.6 Install Moodle ==&lt;br /&gt;
&lt;br /&gt;
It says to edit lines five and ten. Lines five and ten in what file? My best guess is httpd.conf, but shouldn&#039;t it say so? --[[User:Richard Enison|Richard Enison]] 14:59, 6 May 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=34602</id>
		<title>Installation FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installation_FAQ&amp;diff=34602"/>
		<updated>2008-04-05T18:34:38Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Maximum upload file size - how to change it? */  fixed broken link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FAQ}}&lt;br /&gt;
==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==PHP - is it installed and what version do I have?==&lt;br /&gt;
&lt;br /&gt;
Make a new file on your web site called &#039;&#039;info.php&#039;&#039;, containing the following text, and call it from your browser:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?PHP phpinfo() ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If nothing happens then you don&#039;t have PHP installed or your webserver is not configured to handle .php files properly. See the installation docs for some information about where to download it for your computer. See the [[phpinfo]] page for details about the content of this page.&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== System information needed for Installation Forum ==&lt;br /&gt;
When posting questions to the installation forum, try to provide as much background information as possible about your moodle system. Use this template to copy and paste into your post:&lt;br /&gt;
* Server Operating System name (version also if possible): &lt;br /&gt;
* Browser name (version also if possible):&lt;br /&gt;
* Moodle version:&lt;br /&gt;
* Moodle install type? (New/Upgrade):&lt;br /&gt;
* Moodle config.php attached?(Y/N):&lt;br /&gt;
* Phpinfo attached? (Y/N):&lt;br /&gt;
&lt;br /&gt;
For the last two items, try to include the following in your post as an attachment:&lt;br /&gt;
* A copy of your phpinfo output as shown in your browser (see the instructions above for an explanation of how to obtain this).&lt;br /&gt;
* A copy of the Moodle configuration file. This is located in the directory moodle and is named config.php&lt;br /&gt;
&lt;br /&gt;
Copy and paste both of these into a single text file (using vi, Notepad, etc) and attach this to your post.&lt;br /&gt;
&lt;br /&gt;
If you cannot provide your phpinfo, try to copy &amp;amp; paste and complete these in your post:&lt;br /&gt;
* Webserver (e.g. Apache/IIS) version:&lt;br /&gt;
* Database server (e.g. MySQL, PostgreSQL) version:&lt;br /&gt;
* PHP version:&lt;br /&gt;
&lt;br /&gt;
For installation on web hosting accounts: contact your support desk who should be able to tell you this information.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Security Warning&#039;&#039;&#039;: Make sure you edit any files and delete any passwords before posting onto the forum.&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==What &amp;amp; where are Moodle&#039;s configuration settings stored?==&lt;br /&gt;
Configuration settings are stored in the config.php file stored in your moodle folder. This file is created during the installation process. If there is a problem and the installation cannot create the file, you can try creating it manually from the [[Configuration file]] docs. Please remember that manually editing the file is not recommended and may lead to blank pages, especially if there are additional spaces and/or lines after the final php closing tag &amp;quot;?&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Running a health check==&lt;br /&gt;
Moodle contains a script that will help identify common php and webserver configuration problems as well as configuration problems. It is a good idea to run this script to check if you are having post-installation problems. Use your browser to run this file:&lt;br /&gt;
&lt;br /&gt;
 http://www.mymoodle.com/moodle/admin/health.php&lt;br /&gt;
&lt;br /&gt;
Change the above line if you have installed moodle in the webroot instead of a folder inside the webroot.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Downloading previous releases of Moodle==&lt;br /&gt;
* &#039;&#039;&#039;Generic Packages&#039;&#039;&#039;: If your server does not meet the [[Installing_Moodle#Requirements | requirements]] for the current version of Moodle, you can download previous releases by using wget, lynx or curl with this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
:For example: to download Moodle version 1.5, use http://download.moodle.org/stable15. You&#039;ll see a directory tree with the files displayed. Click on the one you want and download as normal - if you require the latest update of the version, scroll to the end of the list and download the &amp;quot;moodle-latest&amp;quot; file, or alternatively use these URLs for zip or tgz downloads:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/moodle-latest-[version_number].tgz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Changes made in the version in the last month are listed in the &amp;quot;CHANGES&amp;quot; file in the directory listing. The files you download contain Moodle code and are not the Windows or Mac packages - so you need to have a webserver, a database server and PHP already installed. The earliest version available is Moodle 1.3.&lt;br /&gt;
* &#039;&#039;&#039;Windows Packages&#039;&#039;&#039;: To download previous releases of the Moodle packages for Windows, use this URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/windows/MoodleWindowsInstaller-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Mac Packages&#039;&#039;&#039;: To download previous releases of the Mac pacakges, use either of these URLs (depending on whether you need the Intel or PPC package):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-Intel-[version_number].dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-PPC-[version_number}.dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Using CVS&#039;&#039;&#039;: You can also use CVS to download older releases and incremental releases of the Moodle generic packages, e.g. Moodle 1.5.4 - see the [[CVS_for_Administrators | CVS documentation]].&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
== How to enable and check PHP error logs==&lt;br /&gt;
PHP can be set up to log errors in a variety of different ways: two of these involve the use of the php.ini file and the ini_set command. &lt;br /&gt;
* &#039;&#039;&#039;Using the php.ini file&#039;&#039;&#039;: The log settings are contained in the php.ini file stored on the server. If you don&#039;t know where that is, edit your Moodle &#039;&#039;config.php&#039;&#039; and add the following as the second line&lt;br /&gt;
&lt;br /&gt;
  phpinfo();&lt;br /&gt;
&lt;br /&gt;
:then reload the web page. Look for the entry &#039;&#039;&#039;Configuration File (php.ini) Path&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:When you have located php.ini open it in your favorite text editor. Find the &#039;&#039;&#039;Error handling and logging&#039;&#039;&#039; section of the php.ini file. Make sure that both &#039;&#039;&#039;display_errors = On&#039;&#039;&#039;, &#039;&#039;&#039;display_startup_errors = On&#039;&#039;&#039; and &#039;&#039;&#039;log_errors = On&#039;&#039;&#039; are present and uncommented. Check the value of &#039;&#039;&#039;error_log&#039;&#039;&#039; - 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).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Using ini_set commands&#039;&#039;&#039;: If you are using Moodle 1.7 or higher, the previous steps are not enough. In those versions error logging parameters are dependant on certain administrative settings that you specify in the debugging section. The problem is that if you can&#039;t access the administrative pages, you can&#039;t set the debugging options. So the only way to modify them is by adding the following lines to your config.php file, just before the last line (the one containing a single&#039;?&amp;gt;&#039; only):&lt;br /&gt;
&lt;br /&gt;
  ini_set (&#039;display_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;log_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;display_startup_errors&#039;, &#039;on&#039;);&lt;br /&gt;
  ini_set (&#039;error_reporting&#039;, E_ALL);&lt;br /&gt;
&lt;br /&gt;
:This will enable the same settings specified above even if Moodle sets them otherwise. &lt;br /&gt;
:&#039;&#039;&#039;Important&#039;&#039;&#039;: Remember to put them just before the last line of config.php.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Any text I add with an apostrophe (&#039;) or a quote (&amp;quot;) causes errors or comes up with a slash added==&lt;br /&gt;
&lt;br /&gt;
Problems caused by apostrophes are caused by incorrect &amp;quot;magic quotes&amp;quot; settings. Moodle requires the following settings in the php.ini file (which are usually the default):&lt;br /&gt;
&lt;br /&gt;
 magic_quotes_gpc = On&lt;br /&gt;
 magic_quotes_runtime = Off&lt;br /&gt;
&lt;br /&gt;
Please see [[Installing Moodle]] for more details.&lt;br /&gt;
&lt;br /&gt;
If you are using [[Debian_GNU/Linux_installation|Debian]] then the problem might be in the version of PHP that you have installed. Have a look at this [http://tracker.moodle.org/browse/MDL-9691 bug report ]  to see if it matches your situation.&lt;br /&gt;
&lt;br /&gt;
==Email copies are not being sent from my forums==&lt;br /&gt;
&lt;br /&gt;
You &#039;&#039;must&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
Basically, you need to set up a process to regularly call the script &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://yoursite/admin/cron.php&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Please refer to the [[Cron|cron instructions]].&lt;br /&gt;
&lt;br /&gt;
Tips:&lt;br /&gt;
* Try the default settings in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039;. This generally works.&lt;br /&gt;
*Make sure that &#039;&#039;allowuseremailcharset&#039;&#039; in &#039;&#039;Administration &amp;gt; Server &amp;gt; Email&#039;&#039; is set to No. Setting this to Yes can cause a problem in some versions of Moodle.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Error: database connection failed==&lt;br /&gt;
&lt;br /&gt;
If you get errors like &amp;quot;database connection failed&amp;quot; or &amp;quot;could not connect to the database you specified&amp;quot;, here are some possible reasons and some possible solutions.&lt;br /&gt;
&lt;br /&gt;
* Your &#039;&#039;&#039;database server&#039;&#039;&#039; isn&#039;t installed or running. To check this for MySQL try typing the following command line&lt;br /&gt;
 $telnet database_host_name 3306&lt;br /&gt;
:You should get a cryptic response which includes the version number of the MySQL server. &lt;br /&gt;
* If you are attempting to run &#039;&#039;&#039;two instances of Moodle on different ports&#039;&#039;&#039;, use the ip address of the host (not localhost) in the $CFG-&amp;gt;dbhost setting, e.g. $CFG-&amp;gt;dbhost = 127.0.0.1:3308.&lt;br /&gt;
* You don&#039;t have the &#039;&#039;&#039;PHP mysql or postgresql extensions&#039;&#039;&#039; installed (please refer to FAQ re. whether PHP is installed).&lt;br /&gt;
* You haven&#039;t created a &#039;&#039;&#039;Moodle database and assigned a user&#039;&#039;&#039; with the correct privileges to access it. &lt;br /&gt;
* The &#039;&#039;&#039;Moodle database settings&#039;&#039;&#039; are incorrect. The database name, database user or database user password in your Moodle configuration file &#039;&#039;config.php&#039;&#039; are incorrect. Use phpMyAdmin to set up and check your MySQL installation.&lt;br /&gt;
* Check that there are &#039;&#039;&#039;no apostrophes or non-alphabetic letters&#039;&#039;&#039; in your MySQL username or password.&lt;br /&gt;
* You are using MySQL version 4.1 or higher but the PHP MySQL extension is pre-4.1 (check in your phpinfo output). In this case the &#039;&#039;&#039;default password hashing algorithm&#039;&#039;&#039; is incompatible with that available in the PHP mysql extension versions 4.x.x. Use these MySQL commands to change the passwords to the old format:&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt;SET PASSWORD FOR &#039;root&#039;@&#039;localhost&#039; = OLD_PASSWORD(&#039;password&#039;);&lt;br /&gt;
 mysql&amp;gt;SET PASSWORD FOR &#039;moodleuser&#039;@&#039;localhost&#039; = OLD_PASSWORD(&#039;password&#039;);&lt;br /&gt;
&lt;br /&gt;
:Also, consider upgrading your PHP MySQL extension. See [http://dev.mysql.com/doc/mysql/en/old-client.html this MySQL document] for further information on how to deal with this problem.&lt;br /&gt;
* You are using Fedora core 3 or some other Linux system with &#039;&#039;&#039;SELinux installed&#039;&#039;&#039; and enabled. See the following URL for information on how to disable SELinux: http://fedora.redhat.com/projects/selinux/ If you don&#039;t want to disable SELinux, you have to allow httpd process to create network connections:&lt;br /&gt;
&lt;br /&gt;
 setsebool httpd_can_network_connect true&lt;br /&gt;
 &lt;br /&gt;
* Mac OSX users -- if you are running MySQL on a Mac OSX, try changing &#039;&#039;&#039;$CFG-&amp;gt;dbhost&#039;&#039;&#039; from &#039;localhost&#039; to &#039;127.0.0.1&#039;&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: MySQL page on [http://dev.mysql.com/doc/refman/5.0/en/common-errors.html common errors] which lists several possible scenarios for connection failure, with advice on how to fix the problems.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I can&#039;t log in - I just stay stuck on the login screen==&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;src=bar_sch_nam Norton firewall products].&lt;br /&gt;
&lt;br /&gt;
The server admin can also fix this for everyone by changing the &#039;&#039;secureforms&#039;&#039; variable to &#039;No&#039; in the security section of Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]].&lt;br /&gt;
&lt;br /&gt;
Another possible cause of this problem is that sessions are not configured properly on the server. You can test this by calling the script &amp;lt;nowiki&amp;gt;http://yourserver/moodle/lib/session-test.php&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are still having problems, read the [[Can_not_log_in | Cannot log in]] page.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I can&#039;t log in with message &amp;quot;Please verify that the current setting of session.save_path is correct&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
This error occurs when PHP is having problems saving its session files. You may also see these other error messages displayed on the screen or in your log files:&lt;br /&gt;
&lt;br /&gt;
 Warning: Unknown: open(some-path/sessions/sess_acbf942a7399db3489ffa910e35d5242, O_RDWR)&lt;br /&gt;
 failed: Permission denied (13) in Unknown on line 0&lt;br /&gt;
&lt;br /&gt;
 Warning: Unknown(): open(some-path/sessions/sess_acbf942a7399db3489ffa910e35d5242, O_RDWR) &lt;br /&gt;
 failed: No space left on device (28) in Unknown on line 0&lt;br /&gt;
&lt;br /&gt;
 Warning: Unknown: Failed to write session data (files). Please verify that the current &lt;br /&gt;
 setting of session.save_path is correct (some-path/sessions) in Unknown on line 0 &lt;br /&gt;
&lt;br /&gt;
To temporarily bypass these errors, &#039;&#039;&#039;use database sessions&#039;&#039;&#039; by editing your [[Configuration_file | moodle configuration file]] and adding this line:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dbsessions = true;&lt;br /&gt;
&lt;br /&gt;
Database sessions may overload your mysql database and are not ideal in a shared hosting environment, so if this solves the problem, you can start fixing the problem as follows:&lt;br /&gt;
* Check &#039;&#039;&#039;access rights&#039;&#039;&#039;. The session.save_path should be accessible by the apache user. Try this command:&lt;br /&gt;
&lt;br /&gt;
 chown -R apache:apache some-path/sessions&lt;br /&gt;
&lt;br /&gt;
:This assumes that &#039;apache&#039; is the name of the user your webserver runs under - it could also be &#039;nobody&#039;.&lt;br /&gt;
* Check the &#039;&#039;&#039;permissions&#039;&#039;&#039; to the directory that PHP is trying to save to (session.save_path = some-path/sessions). Set the permissions initially to 0777 (everyone read, write, execute) with this command:&lt;br /&gt;
&lt;br /&gt;
 chmod -R 0777 some-path/sessions&lt;br /&gt;
&lt;br /&gt;
:If this fixes the problem, reduce the permissions (700 is recommended).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Session problems can be specific to your server environment. As an example, see [http://moodle.org/mod/forum/discuss.php?d=55925#254596 this forum discussion] about session problems with Lycos hosting.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I log in but the login link doesn&#039;t change. I am logged in and can navigate freely.==&lt;br /&gt;
&lt;br /&gt;
Make sure the URL in your &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; setting is exactly the same as the one you are actually using to access the site.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I keep getting this error: A server error that affects your login session was detected.==&lt;br /&gt;
&lt;br /&gt;
Please refer to the Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=73716 A server error that affects your login session was detected. Please login again or restart your browser.].&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==I keep getting this error: Failed opening required &#039;/web/moodle/lib/setup.php&#039;==&lt;br /&gt;
&lt;br /&gt;
In your &#039;&#039;config.php&#039;&#039;, the setting that you use for the dirroot variable must be the complete path from the root of your server&#039;s hard drive.&lt;br /&gt;
&lt;br /&gt;
Sometimes people only use the path from their home directory, or relative to the root of the web server directory.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==My pages show fatal errors such as : Parse error, call to undefined function: get_string()==&lt;br /&gt;
&lt;br /&gt;
If you see errors like:&lt;br /&gt;
&lt;br /&gt;
 Parse error: parse error, unexpected T_VARIABLE in /path/to/moodle/config.php on line 94 &lt;br /&gt;
 Fatal error: Call to undefined function: get_string() in /path/to/moodle/mod/resource/lib.php&lt;br /&gt;
 on line 11&lt;br /&gt;
&lt;br /&gt;
then you have probably left out a semi-colon or closing quote from a line in &#039;&#039;config.php&#039;&#039; (previous to line 94).&lt;br /&gt;
&lt;br /&gt;
Another possibility is that you edited &#039;&#039;config.php&#039;&#039; in a program like Word and saved it as a HTML web page, instead of using a plain text editor like Notepad.&lt;br /&gt;
&lt;br /&gt;
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 (&amp;lt;? ?&amp;gt;) instead of proper ones (&amp;lt;?php ?&amp;gt;). 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:&lt;br /&gt;
&lt;br /&gt;
 short_open_tag = On&lt;br /&gt;
&lt;br /&gt;
You should never find short tags in core moodle code. If you do, please file a bug in the bug tracker.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Serious Error! Could not set up the site!==&lt;br /&gt;
&lt;br /&gt;
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!].&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Uploaded files give &amp;quot;File not found&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
For example: Not Found: The requested URL /moodle/file.php/2/myfile.jpg was not found on this server.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;httpd.conf&#039;&#039;, or to a &#039;&#039;.htaccess&#039;&#039; file in your local directory (see [[Installing Moodle]] for more details):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
Note, this will ONLY work for Apache versions 2.x.&lt;br /&gt;
&lt;br /&gt;
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&#039;t be able to use relative links within HTML resources.&lt;br /&gt;
&lt;br /&gt;
To use this alternative method, you should change the &#039;&#039;slasharguments&#039;&#039; variable. For moodle versions &amp;lt; 1.7, this is located in the Operating System section of &#039;&#039;Administration &amp;gt; Configuration &amp;gt; [[admin/config|Variables]]&#039;&#039;. In later versions, this option is located in &#039;&#039;Site Administration &amp;gt; Server &amp;gt; HTTP&#039;&#039;. You should now be able to access your uploaded files.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==When I go to the admin page, I get told to make dirroot blank!==&lt;br /&gt;
&lt;br /&gt;
If you see errors like this:&lt;br /&gt;
&lt;br /&gt;
 Please fix your settings in config.php: &lt;br /&gt;
 You have: $CFG-&amp;gt;dirroot = &amp;quot;/home/users/fred/public_html/moodle&amp;quot;; &lt;br /&gt;
 but it should be: $CFG-&amp;gt;dirroot = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;admin/index.php&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 if ($dirroot != $CFG-&amp;gt;dirroot) {&lt;br /&gt;
&lt;br /&gt;
and change it to this:&lt;br /&gt;
&lt;br /&gt;
 if (!empty($dirroot) and $dirroot != $CFG-&amp;gt;dirroot) {&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==When trying to add a resource I receive error messages==&lt;br /&gt;
&lt;br /&gt;
Assuming you are using Apache, then it&#039;s quite likely that your setting in &#039;&#039;config.php&#039;&#039; for &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; is different from the actual URL you are using to access the site. Also try turning off the &#039;&#039;secureforms&#039;&#039; variable in the security section of Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]].&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Why are all my pages blank?==&lt;br /&gt;
&lt;br /&gt;
Check the dirroot variable in &#039;&#039;config.php&#039;&#039;. You must use complete, absolute pathnames e.g.&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dirroot = &amp;quot;d:\inetpub\sites\www.yoursite.com\web\moodle&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;php.ini&#039;&#039; file and reload the web page.&lt;br /&gt;
&lt;br /&gt;
 display_errors = On&lt;br /&gt;
 display_startup_errors = On&lt;br /&gt;
&lt;br /&gt;
To determine if MySQL support is your problem, insert this as the second line in your &#039;&#039;config.php&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
 phpinfo();&lt;br /&gt;
&lt;br /&gt;
then reload the web page. Examine the output closely to see if MySQL is supported. If not look for a package you are missing.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
== Why is a particular page blank or incomplete? ==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your web server log files!!&#039;&#039;&#039; &lt;br /&gt;
:If a particular page is blank or incomplete (it doesn&#039;t display the footer), before you do anything else [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | check your error logs]]. Having established that PHP error 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.&lt;br /&gt;
&lt;br /&gt;
*If you are &#039;&#039;&#039;upgrading to a new version of Moodle&#039;&#039;&#039;, check that you do not have an old version of a non-standard block or module installed. Remove any such blocks or modules installed using the admin settings page and start the install process again. However, do also make sure that you have included all optional plugins that were required by your courses. &lt;br /&gt;
&lt;br /&gt;
*If you &#039;&#039;&#039;do not see any blocks listed&#039;&#039;&#039;, turn editing on and remove any blocks that you have added to that page and try reloading.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Installation hangs when setting-up database tables==&lt;br /&gt;
*Sometimes the installation will hang when setting up tables. This will be an abrupt hang with half the page displayed in the browser and/or other outputs removed, e.g. the “Scroll to continue” link is displayed but no “Continue” button is there. If this is the case, it is usually a mysql error and not a php error. Check that there is no limit placed on your mysql database, e.g. a &amp;quot;questions&amp;quot; limit.&lt;br /&gt;
&lt;br /&gt;
*If the install is on a webhost, adding the following line to the .htaccess file in the moodle directory has been known to solve the problem.&lt;br /&gt;
 AddType x-mapp-php5 .php&lt;br /&gt;
&lt;br /&gt;
*Try also renaming the .htaccess file so that it is disabled.&lt;br /&gt;
&lt;br /&gt;
*You may also want to look and see if you&#039;ve customized any of your code.  Look at the last successful table, and then look at the block, mod, or other code that is referenced by that table.  For example, if your install hangs and continues to say that the forum tables were successful as the last message, look at /mod/forum/ for any custom code.  If you have customized code, backup those files and replace with the correct files.  You can then restart the install by renaming config.php or reinstalling your database from the backup.  If your install is successful, you can make your code changes back into the stock Moodle code.&lt;br /&gt;
&lt;br /&gt;
*It may also be that the &amp;quot;memory_limit&amp;quot; in your php.ini is set too low. Please check your php.ini file and allocate the recommended amount (see [https://docs.moodle.org/en/Installing_Moodle#Requirements Moodle requirements]). For Moodle version 1.8 and above at least 40MB is  recommended.&lt;br /&gt;
&lt;br /&gt;
*A work-around to this problem is to setup a working Moodle system on your local PC or server using the [http://download.moodle.org Moodle Packages]. Once you have a running Moodle, [https://docs.moodle.org/en/Upgrading_Moodle#Backup_important_data backup the database] and import to your webhost. Then backup the Moodle code itself (the &amp;quot;moodle&amp;quot; directory on your PC) and copy this to your webhost using (for example) FTP. Finally, edit the moodle/config.php file for the new settings that have to be changed for the webhost.&lt;br /&gt;
&lt;br /&gt;
*To avoid this problem when upgrading, prefer to upgrade incrementally. For example: upgrade from 1.6.* to 1.7.* and then to 1.8.* rather than straight from 1.6.* to 1.8.*&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: When upgrading an existing database, the installation may appear to hang at the roles generation phase. This process can take a very long time - so please be patient.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Why can&#039;t I upload a new image into my profile?==&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see anything on your user profile pages to let you upload user images then it&#039;s usually because GD is not enabled on your server. GD is a library that allows image processing.&lt;br /&gt;
&lt;br /&gt;
1. Make sure &#039;&#039;&#039;GD has been included in your PHP installation&#039;&#039;&#039;. You can check this by going into Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[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.&lt;br /&gt;
&lt;br /&gt;
2. If Moodle thinks GD is not installed, then you will need to &#039;&#039;&#039;install the GD library&#039;&#039;&#039;. &lt;br /&gt;
*On Unix you may need to re-compile PHP with arguments something like this:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-gd &lt;br /&gt;
 --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-ttf --enable-gd-native-ttf &lt;br /&gt;
 --enable-magic-quotes --with-mysql --enable-sockets --enable-track-vars &lt;br /&gt;
 --enable-versioning --with-zlib&lt;br /&gt;
&lt;br /&gt;
* On Windows this is usually a matter of &amp;quot;turning on&amp;quot; the extension in PHP by editing your php.ini file. To do this remove the semicolon for the php_gd2.dll extension - check that this file is actually present in your php extensions  folder first (search your php.ini for extension_dir to determine where this points to on your hard disk). You should then have a line that looks like this:&lt;br /&gt;
 extension=php_gd2.dll&lt;br /&gt;
&lt;br /&gt;
:Windows users should see the [[Installing AMP|installation instructions]] for further help. &lt;br /&gt;
&lt;br /&gt;
3. Remember to &#039;&#039;&#039;restart your webserver&#039;&#039;&#039; (if possible) and re-visit the Moodle configuration page after making any changes to PHP so it can pick up the correct version of GD.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=44271 Profile pictures] for additional information.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Why do I keep getting error messages about &amp;quot;headers already sent&amp;quot;?==&lt;br /&gt;
&lt;br /&gt;
If you see errors like this:&lt;br /&gt;
&lt;br /&gt;
 Warning: Cannot add header information - headers already sent by &lt;br /&gt;
 (output started at /webs/moodle/config.php:87) in /webs/moodle/lib/moodlelib.php &lt;br /&gt;
 on line 1322 &lt;br /&gt;
&lt;br /&gt;
 Warning: Cannot add header information - headers already sent by &lt;br /&gt;
 (output started at /webs/moodle/config.php:87) in /webs/moodle/lib/moodlelib.php &lt;br /&gt;
 on line 1323 &lt;br /&gt;
&lt;br /&gt;
 Warning: Cannot add header information - headers already sent by &lt;br /&gt;
 (output started at /webs/moodle/config.php:87) in /webs/moodle/login/index.php &lt;br /&gt;
 on line 54&lt;br /&gt;
&lt;br /&gt;
you have blank lines or spaces after the final &amp;lt;code&amp;gt;?&amp;gt;&amp;lt;/code&amp;gt; in your &#039;&#039;config.php&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
== Why doesn&#039;t my Moodle site display the time and date correctly? ==&lt;br /&gt;
&lt;br /&gt;
Each language requires a specific language code (called a &#039;&#039;&#039;locale&#039;&#039;&#039; code) to allow dates to be displayed correctly. The language packs contain default standard codes, but sometimes these don&#039;t work on Windows servers.&lt;br /&gt;
&lt;br /&gt;
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. &amp;quot;esp_esp&amp;quot; for spanish)&lt;br /&gt;
&lt;br /&gt;
These new locale codes can be entered on the Administration &amp;gt;&amp;gt; Configuration &amp;gt;&amp;gt; [[admin/config|Variables]] page, where they override the ones in the currently chosen language pack.&lt;br /&gt;
&lt;br /&gt;
==I receive this error &amp;quot;500:Internal Server Error&amp;quot;==&lt;br /&gt;
You&#039;ll get this error message if there is a syntax error in your .htaccess or httpd.conf files. You will also see this error if your server does not support .htaccess files, especially if it is running PHPsuexec. Also, you may have a directive in your .htaccess or httpd.conf files which are not compatible with your web server version.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==How do I uninstall Moodle?==&lt;br /&gt;
&#039;&#039;&#039;Moodle package installation&#039;&#039;&#039;: If you have downloaded a Moodle package, simply uninstall using your system commands. On Windows PCs, you should access the Control Panel -&amp;gt; Add/Remove Programs. Select the package name and click Change or Remove Programs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Webhost/manual installation&#039;&#039;&#039;: If you have installed Moodle manually or have installed onto a webhost, follow these steps:&lt;br /&gt;
*Delete the moodle database using this mysql command (or delete using your mysql client, e.g. PHPMyAdmin):&lt;br /&gt;
&amp;lt;pre&amp;gt;sql&amp;gt;DROP DATABASE moodle;&amp;lt;/pre&amp;gt;&lt;br /&gt;
:In the above example replace &#039;moodle&#039; with the name of the moodle database you created when installing.&lt;br /&gt;
*Delete the moodledata directory. If you, or your users, have uploaded materials into this directory take a copy of these before deleting this directory.&lt;br /&gt;
*Delete the moodle directory itself. This will delete all of the moodle PHP script files.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==How do I upgrade Moodle? Do I just overwrite the files?==&lt;br /&gt;
Do not overwrite files, it may cause strange errors. You should read the [[Upgrade]] documentation before proceeding.&lt;br /&gt;
&lt;br /&gt;
==Migrating Moodle to a new site or server==&lt;br /&gt;
Migrating Moodle means that you have to move the current installation to a new server, and so may have to change IP addresses or DNS entries. To do this you will need to change the $CFG-&amp;gt;wwwroot value in the config.php on the new server. You will also have to change any absolute links stored in the database backup file (before restoring the file on the new server) either using the admin/replace.php script, your text editor or another &amp;quot;search and replace&amp;quot; tool, e.g. sed. For more details see the [[Moodle_migration | Moodle Migration]] page.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Fatal error allowed memory size exhausted. How do I increase my php memory limit?==&lt;br /&gt;
You will sometimes see an error message something like this:&lt;br /&gt;
 Fatal error: Allowed memory size of 67108864 bytes exhausted &lt;br /&gt;
 (tried to allocate xx bytes) in /var/www/moodle/yyyy.php&lt;br /&gt;
This error means that the php memory_limit value is not enough for the php script. The memory_limit value is the &amp;quot;allowed memory size&amp;quot; - 64M in the example above (67108864 bytes / 1024 = 65536 KB. 65536 KB / 1024 = 64 MB). You will need to increase the php memory_limit value until this message is not shown anymore. There are two methods of doing this.&lt;br /&gt;
*On a hosted installation, add the following line to your .htaccess file (or create one in the moodle directory if it does not already exist):&lt;br /&gt;
 php_value memory_limit &amp;lt;value&amp;gt;M&lt;br /&gt;
 Example: php_value memory_limit 40M&lt;br /&gt;
*If you have your own server with shell access, edit your php.ini file (make sure it&#039;s the correct one by checking in your phpinfo output) as follows:&lt;br /&gt;
 memory_limit &amp;lt;value&amp;gt;M&lt;br /&gt;
 Example: memory_limit 40M&lt;br /&gt;
Remember that you need to restart your web server to make changes to php.ini effective. An alternative is to disable the memory_limit by using the command &#039;&#039;memory_limit 0&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Why does my new installation display correctly on the server, but when I view it from a different machine, styles and images are missing?==&lt;br /&gt;
In the installation instructions, one of the suggested settings for &#039;webroot&#039; is &#039;localhost&#039;. This is fine if all you want to do is some local testing of your new Moodle installation. If, however, you want to view your new installation from another machine on the same local area network, or view your site on the internet, you will have to change this setting:&lt;br /&gt;
*For local testing, &#039;localhost&#039; is fine for the webroot ($CFG-&amp;gt;wwwroot in config.php). &lt;br /&gt;
*If you want to test your site from other machines on the same local area network (LAN), then you will have to use the private ip address of the serving machine, (e.g. 192.168.1.2/moodle) or the network name of the serving computer (e.g. network_name_of_serving_machine/moodle) as the web root. Depending on your LAN setup, it may be better to use the network name of the computer rather than its (private) ip address, because the ip address can and will change from time to time. If you don&#039;t want to use the network name, then you will have to speak to your network administrator and have them assign a permanent ip address to the serving machine.&lt;br /&gt;
*Finally, if you want to test your new installation across the internet, you will have to use either a domain name or a permanent (public) ip address/moodle as your web root. To handle both types of access, see [https://docs.moodle.org/en/masquerading masquerading].&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
==Maximum upload file size - how to change it?==&lt;br /&gt;
There are several places to change the maximum file upload size. The first place to check is the Administration block.   Security -&amp;gt; Site Policies -&amp;gt; and look for &amp;quot;Maximum Uploaded File Size&amp;quot;.  This is the &amp;quot;maxbyte&amp;quot; variable found in older versions of Moodle (under Admin &amp;gt; Variables). Teachers may also set the maximum file size by the [[Course_settings#Maximum_upload_size|course administration block]].&lt;br /&gt;
&lt;br /&gt;
The second place to check are the server files.  The php.ini file has a limit which will override any other setting. (Hint: remember to restart your server for changes to take effect).  For more help see:&lt;br /&gt;
*[[Installing_Moodle#Recheck_PHP_settings]]&lt;br /&gt;
*[[Installing_Moodle#Using_a_.htaccess_file_for_webserver_and_PHP_settings]]&lt;br /&gt;
*[[Site_policies#Maximum_uploaded_file_size]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Installation_FAQ#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:FAQ Instalación]]&lt;br /&gt;
[[fr:FAQ d&#039;installation]]&lt;br /&gt;
[[nl:Installatie FAQ]]&lt;br /&gt;
[[ja:インストールFAQ]]&lt;br /&gt;
[[ru:Установка FAQ]]&lt;br /&gt;
[[pl:Instalacja FAQ]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Upgrading&amp;diff=32151</id>
		<title>Talk:Upgrading</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Upgrading&amp;diff=32151"/>
		<updated>2008-02-13T10:57:39Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Improvements needed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Notes --[[User:chris collman|chris collman]] 07:34, 29 October 2006 (CST)==&lt;br /&gt;
Sorry for this ramble but... this page needs more work. My instincts don&#039;t like the instructions for using download archive, but I am not qualified.  Suspect they are Moodle 1.0 .   &lt;br /&gt;
&lt;br /&gt;
For example, this section the instructions tell me to copy the old moodle to moodle-backup, then unpack moodle-latest to moodle-backup (that is what the mv command says I believe). Big issue not mentioned is that non-standard modules (Score Lock comes to mind) alters the SQL tables. While any non-standard module should not, who knows the ways a site may have been improved which will impact more than just the moodle files.   We just have to be careful about being too specific and run up a huge red flag for those who like to jump off cliffs &lt;br /&gt;
&lt;br /&gt;
This page starts off by refereing to installing 1.6 (good) for more specific instructions.     I think the entire page needs to either be more generic with lots of links, and/or give general instructions as in a checklist.  There are too many types of Moodle installations to get specific.    How different are installs from updates?  --[[User:chris collman|chris collman]] 07:46, 29 October 2006 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What does the below line mean?==&lt;br /&gt;
 You can also use the &amp;quot;Export&amp;quot; feature in Moodle&#039;s optional &amp;quot;Database&amp;quot; web interface to do the same thing on all platforms.&lt;br /&gt;
&lt;br /&gt;
Is it a reference to PHPMyAdmin, maybe? If yes, then this might confuse people now that there is a Moodle module &amp;quot;Database&amp;quot; too, which is quite unrelated to the whole Moodle installation database... [[User:Samuli Karevaara|Samuli Karevaara]] 17:43, 15 April 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
:I agree - this comes from a time space where there wasn&#039;t such a thing as a database module. I see that it is called MySQL Admin on the download pages these days - I&#039;ll update the page accordingly --[[User:koen roggemans|koen roggemans]] 18:37, 17 April 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
::Okay, I see! Now, specially with the new descriptive text and a link, it makes a lot more sense :-) [[User:Samuli Karevaara|Samuli Karevaara]] 20:53, 18 April 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
== mysqldump paramaters ==&lt;br /&gt;
&lt;br /&gt;
According to mysqldump --help, parameter &amp;quot;-a&amp;quot; is deprecated. You should use &amp;quot;--create-options&amp;quot; instead.&lt;br /&gt;
&lt;br /&gt;
== Improvements needed ==&lt;br /&gt;
&lt;br /&gt;
Let me start by saying I agree with CC (note #1) that this page needs work. Let me start with the very first sentence: &amp;quot;Moodle is designed to upgrade cleanly from any earlier version to any later version.&amp;quot; Well, it may be designed that way, but it doesn&#039;t work that way. I have seen several problems reported in the forums by Moodlers who tried to skip a major version in their upgrading (1.6 to 1.8, 1.4. to 1.6, etc.). The page should warn people about that. I don&#039;t think I know enough to say all that needs to be said about that correctly, so I hope a Moodle expert does something about this.&lt;br /&gt;
&lt;br /&gt;
Also, while this page warns people, as the installation FAQ does, not to upgrade by overwriting the old code, it doesn&#039;t really say enough about how to handle patches to the code that have been made that will be lost if the old code is simply moved out of the way, in effect, and replaced by the new. Not just non-standard blocks and modules, themes, and language packs, but patches as well. --[[User:Richard Enison|Richard Enison]] 04:57, 13 February 2008 (CST)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Upgrading&amp;diff=32150</id>
		<title>Talk:Upgrading</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Upgrading&amp;diff=32150"/>
		<updated>2008-02-13T10:56:41Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: Improvements needed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Notes --[[User:chris collman|chris collman]] 07:34, 29 October 2006 (CST)==&lt;br /&gt;
Sorry for this ramble but... this page needs more work. My instincts don&#039;t like the instructions for using download archive, but I am not qualified.  Suspect they are Moodle 1.0 .   &lt;br /&gt;
&lt;br /&gt;
For example, this section the instructions tell me to copy the old moodle to moodle-backup, then unpack moodle-latest to moodle-backup (that is what the mv command says I believe). Big issue not mentioned is that non-standard modules (Score Lock comes to mind) alters the SQL tables. While any non-standard module should not, who knows the ways a site may have been improved which will impact more than just the moodle files.   We just have to be careful about being too specific and run up a huge red flag for those who like to jump off cliffs &lt;br /&gt;
&lt;br /&gt;
This page starts off by refereing to installing 1.6 (good) for more specific instructions.     I think the entire page needs to either be more generic with lots of links, and/or give general instructions as in a checklist.  There are too many types of Moodle installations to get specific.    How different are installs from updates?  --[[User:chris collman|chris collman]] 07:46, 29 October 2006 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What does the below line mean?==&lt;br /&gt;
 You can also use the &amp;quot;Export&amp;quot; feature in Moodle&#039;s optional &amp;quot;Database&amp;quot; web interface to do the same thing on all platforms.&lt;br /&gt;
&lt;br /&gt;
Is it a reference to PHPMyAdmin, maybe? If yes, then this might confuse people now that there is a Moodle module &amp;quot;Database&amp;quot; too, which is quite unrelated to the whole Moodle installation database... [[User:Samuli Karevaara|Samuli Karevaara]] 17:43, 15 April 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
:I agree - this comes from a time space where there wasn&#039;t such a thing as a database module. I see that it is called MySQL Admin on the download pages these days - I&#039;ll update the page accordingly --[[User:koen roggemans|koen roggemans]] 18:37, 17 April 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
::Okay, I see! Now, specially with the new descriptive text and a link, it makes a lot more sense :-) [[User:Samuli Karevaara|Samuli Karevaara]] 20:53, 18 April 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
== mysqldump paramaters ==&lt;br /&gt;
&lt;br /&gt;
According to mysqldump --help, parameter &amp;quot;-a&amp;quot; is deprecated. You should use &amp;quot;--create-options&amp;quot; instead.&lt;br /&gt;
&lt;br /&gt;
== Improvements needed ==&lt;br /&gt;
&lt;br /&gt;
Let me start by saying I agree with CC (note #1) that this page needs work. Let me start with the very first sentence: &amp;quot;Moodle is designed to upgrade cleanly from any earlier version to any later version.&amp;quot; Well, it may be designed that way, but it doesn&#039;t work that way. I have seen several problems reported in the forums by Moodlers who tried to skip a major version in their upgrading (1.6 to 1.8, 1.4. to 1.6, etc.). The page should warn people about that. I don&#039;t think I know enough to say all that needs to be said about that correctly, so I hope a Moodle expert does something about this.&lt;br /&gt;
&lt;br /&gt;
Also, while this page warns people, as the installation FAQ does, not to upgrade by overwriting the old code, it doesn&#039;t really say enough about how to handle patches to the code that have been made that will be lost if the old code is simply moved out of the way, in effect, and replaced by the new. Not just non-standard blocks and modules, themes, and language packs, but patches as well.&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Converting_files_to_UTF-8&amp;diff=31754</id>
		<title>Converting files to UTF-8</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Converting_files_to_UTF-8&amp;diff=31754"/>
		<updated>2008-01-31T10:34:59Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: made it clear that &amp;quot;-script&amp;quot; is not part of the filename ToUtf8.txt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.6}}&lt;br /&gt;
Some files, like custom language packs or language files from third party modules need to be converted to UTF-8 before they may be used in Moodle 1.6 with UTF-8 database.&lt;br /&gt;
&lt;br /&gt;
==*nix like computers (including Mac OS X)==&lt;br /&gt;
Generally, this may be done with the &#039;&#039;iconv&#039;&#039; command on Unix, Linux or a Mac. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;iconv -f original_charset -t utf-8 originalfile &amp;gt; newfile&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;see also the windows explanation - the script there is one for *nix computers, but used in a cygwin environment&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Windows computers==&lt;br /&gt;
For Windows, there are three methods of performing the conversion. &lt;br /&gt;
&lt;br /&gt;
=== Method 1 ===&lt;br /&gt;
* Open the flat file in PSPad (a freeware editor) : http://www.pspad.com&lt;br /&gt;
* Click on Format, UTF-8&lt;br /&gt;
* Save the file&lt;br /&gt;
&lt;br /&gt;
=== Method 2 ===&lt;br /&gt;
Download the [http://gnuwin32.sourceforge.net/packages/libiconv.htm Windows version] of the iconv program. Download the &amp;quot;Complete package, except source&amp;quot; and run the setup program. The executable is located in the bin folder. Run from the command prompt (Start -&amp;gt; Run -&amp;gt; cmd) and follow the instructions as above.&lt;br /&gt;
&lt;br /&gt;
=== Method 3 ===&lt;br /&gt;
The conversion may also be done by using [http://www.cygwin.com Cygwin], a Linux-like environment for Windows, and excecuting the iconv command in that environment. Here is an example of a working solution on Windows with [http://www.cygwin.com Cygwin]:&lt;br /&gt;
&lt;br /&gt;
* Create a text file, named ToUtf8.txt&lt;br /&gt;
* Fill it with the following code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
FROM=iso-8859-1&lt;br /&gt;
TO=UTF-8&lt;br /&gt;
ICONV=&amp;quot;iconv -f $FROM -t $TO&amp;quot;&lt;br /&gt;
# Convert&lt;br /&gt;
find ToUTF/ -type f -name &amp;quot;*&amp;quot; | while read fn; do&lt;br /&gt;
cp ${fn} ${fn}.bak&lt;br /&gt;
$ICONV &amp;lt; ${fn}.bak &amp;gt; ${fn}&lt;br /&gt;
rm ${fn}.bak&lt;br /&gt;
done&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two things should be changed for your local situation:&lt;br /&gt;
&lt;br /&gt;
# FROM is the originating encoding (the one your original files are in)&lt;br /&gt;
# ToUTF is the foldername where the files that need to be converted are in. This folder may contain subfolders. Make sure you have a backup!&lt;br /&gt;
&lt;br /&gt;
* Start Cygwin.&lt;br /&gt;
* With the &#039;&#039;cd foldername, cd.., ls&#039;&#039; commands, go to the folder on your windows machine where the ToUtf8.txt script and the ToUTF8 folder are in.&lt;br /&gt;
* Execute the script by typing &#039;&#039;sh ToUtf8.txt&#039;&#039; and your files will be converted.&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Language]]&lt;br /&gt;
[[Category:UTF-8]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Conversion de fichiers en UTF-8]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=31573</id>
		<title>Installing Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Installing_Moodle&amp;diff=31573"/>
		<updated>2008-01-24T15:32:54Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* Requirements */  fix grammar and punctuation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Firstly don&#039;t panic! :-)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This guide explains how to install Moodle for the first time. For some of these steps it goes into a lot of detail to try and cover the majority of possible web server setups, so this page may look long and complicated. Don&#039;t panic, once you know how to do it you can install Moodle in minutes!&lt;br /&gt;
&lt;br /&gt;
If you have problems please read this page carefully - most common issues are answered in here. If you still have trouble, you can seek help from the Moodle community via  [http://moodle.org/course/view.php?id=5 moodle.org Using Moodle].&lt;br /&gt;
&lt;br /&gt;
Another option is to contact a [http://moodle.com/hosting/ Moodle Partner providing Moodle hosting] who can completely maintain Moodle for you, so that you can ignore all this and get straight into educating! A Moodle partner is the preferred option but if you decide to choose a hosting company that has cpanel then [http://otaru-jc.ac.jp/hagley/settingupmoodleonhostingwithcpanel.swf this tutorial will guide you]  through the process of choosing a host and setting up moodle via cpanel. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; some hosting companies offer one-click moodle install options, which whilst sometimes effective, usually use old (sometimes years old) versions of moodle and sometimes simply don&#039;t work. If one of these goes wrong, your best bet is often to start from scratch following the instructions here yourself. Its almost certainly quicker.&lt;br /&gt;
&lt;br /&gt;
If you want to run Moodle on your own computer and this page looks a bit daunting, then please see our guides: [[Installing AMP |Installing Apache, MySQL and PHP(AMP)]] or [[Complete install packages| how to install one of Moodle&#039;s complete packages]]. They provide alternative instructions to install all this on most popular platforms.&lt;br /&gt;
==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
Moodle is primarily developed in Linux using [[Apache]], [[MySQL]] and [[PHP]] (also sometimes known as the LAMP platform), but is also regularly tested with Windows XP/2000/2003 (WAMP), Solaris 10 (Sparc and x64), Mac OS X and Netware 6 operating systems. Support for PostgreSQL, Oracle and Microsoft SQL Server is also available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blank page problem while installing Moodle on Windows Vista may occur; following these steps: [[Installing Moodle on Windows Vista]] might help.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note if you are using a hosted account&#039;&#039;&#039;: Most web hosts support all of these requirements by default. You should contact your web host&#039;s support desk to check that this is the case &#039;&#039;&#039;before&#039;&#039;&#039; signing-up with them. It is especially important to ask about any PHP memory limits or MySQL question limits. If your prospective host does not provide a service which meets these requirements, or you are already signed up with them, ask them why and consider taking your business elsewhere if they do not change.&lt;br /&gt;
&lt;br /&gt;
The requirements for Moodle are as follows:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hardware&#039;&#039;&#039; (unless you are using a hosted server). &lt;br /&gt;
* Disk space: 160MB free (min). You will require more free space to store your teaching materials.&lt;br /&gt;
* Memory: 256MB (min), 1GB (recommended). The general rule of thumb is that Moodle can support 50 &#039;&#039;concurrent&#039;&#039; users for every 1GB of RAM, but this will vary depending on your specific hardware and software combination. &lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
* Web server software. Most people use [[Apache]], but Moodle should work fine under any web server that supports [[PHP]], such as [[IIS]] on Windows platforms. PHP does impose requirements on versions of web servers, however these are complex and the general advice is to use the newest version possible of your chosen web server. &lt;br /&gt;
* PHP scripting language. (Please note that there have been issues installing Moodle with [http://www.php-accelerator.co.uk PHP-Accelerator]). There are currently two versions (or branches) of PHP available: PHP4 and PHP5 and the version requirements are listed below.&lt;br /&gt;
** For Moodle version 1.4 or later: PHP4 (version 4.1.0 or later) or PHP5 (version 5.1.0 or later) are supported.&lt;br /&gt;
** For Moodle version 1.6 or later: the PHP4 (version 4.3.0 or later) or PHP5 (version 5.1.0 or later) are supported. &lt;br /&gt;
** Future Moodle versions 2.0 or later will not support PHP4 and will require PHP5 (version 5.2.0 or later).&lt;br /&gt;
** PHP Settings&lt;br /&gt;
*** &#039;&#039;safe_mode&#039;&#039; needs to be OFF (check in your php.ini or Apache configuration file).&lt;br /&gt;
*** &#039;&#039;memory_limit&#039;&#039; should be at least 16M (32M is recommended for Moodle 1.7 and 40M for Moodle 1.8 or later). Large sites may need more than 128M. PHP 5.2.x requires higher memory_limit values than previous versions of PHP. 64bit operating systems require even more memory.&lt;br /&gt;
*** &#039;&#039;session.save_handler&#039;&#039; needs to be set to files. &lt;br /&gt;
** PHP Extensions and libraries&lt;br /&gt;
*** The mbstring extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** The iconv extension is recommended for Moodle 1.6 or later.&lt;br /&gt;
*** [http://www.libgd.org/ GD library] and the [http://www.freetype.org/ FreeType 2] library and extensions are needed to be able to look at the dynamic graphs that the logs pages make.&lt;br /&gt;
*** The mysql extension is required if you are using the MySQL database. Note that in some Linux distributions (notably Red Hat) this is an optional installation.&lt;br /&gt;
*** The pgsql extension is required if you are using the PostgreSQL database.&lt;br /&gt;
*** The zlib extension is required for zip/unzip functionality.&lt;br /&gt;
*** The curl extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The tokenizer extension is recommended for Moodle 1.8 or later.&lt;br /&gt;
*** The curl and openssl extensions are required for the Moodle network functionality (Moodle 1.8 or later).&lt;br /&gt;
*** Other PHP extensions may be required to support optional Moodle functionality, especially external authentication and/or enrolment (e.g. LDAP extension for LDAP authentication and the sockets extension for Chat server).&lt;br /&gt;
* A working database server: [[MySQL]] or [[PostgreSQL]] are completely supported and recommended for use with any version of Moodle. Support for Microsoft SQL Server and Oracle has been added in Moodle 1.7. MySQL is &#039;&#039;the&#039;&#039; choice for many people because it is very popular, but there are some [[Arguments in favour of PostgreSQL|arguments in favour of PostgreSQL]], especially if you are planning a large deployment. &lt;br /&gt;
** For Moodle 1.5 or later, MySQL (version 3.23 or later) or PostgreSQL (7.4 or later). &lt;br /&gt;
** For Moodle 1.6 or later, MySQL (version 4.1.12 or later) or PostgreSQL (7.4 or later).&lt;br /&gt;
** For Moodle 1.7 or later, MySQL (version 4.1.12 or later), PostgreSQL (7.4 or later) or Microsoft SQL Server 2005 (version 9 or [http://moodle.org/mod/forum/discuss.php?d=59284 SQL Server Express 2005])&lt;br /&gt;
: MySQL Notes: For Moodle 1.6 or later, If you use latin languages only you can use MySQL 4.1.12. If you are using non-latin languages you require MySQL 4.1.16 or later. Currently the MySQL setting &amp;quot;strict mode&amp;quot; must be OFF (set to &amp;quot;&amp;quot; or &amp;quot;MYSQL40&amp;quot;) in the MySQL configuration file. &lt;br /&gt;
: PostgreSQL Notes: The minimum version of PostgreSQL is 7.4 and Moodle is widely used with 8.0 and 8.1.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== How many users? ==&lt;br /&gt;
&lt;br /&gt;
In addition to the hardware and software requirements, you will also need to think about the capacity of your Moodle installation in terms of the number of users it can handle. There are two numbers to plan for:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Browsing users&#039;&#039;&#039;: the maximum number of users able to browse your Moodle site. This is the number of computers in your organization or on your course (whichever is greater).&lt;br /&gt;
* &#039;&#039;&#039;Concurrent database users&#039;&#039;&#039;: the maximum number of concurrent database users (needed for Moodle activities such as quizzes). This is the number of users who will be using Moodle at the same time. In an educational institution, use your timetable/roster to obtain this figure.&lt;br /&gt;
&lt;br /&gt;
Once you know these figures for your users, you can start work out if your Moodle installation can support this capacity. The exact number of users depends on your hardware/software/network combination. Usually the amount of memory installed (RAM) is the deciding factor but a faster overall processor speed will also help in reducing waiting times for pages to load. &lt;br /&gt;
&lt;br /&gt;
The general rule of thumb for a single server is that the approx max concurrent users = RAM (GB) * 50 and the approx max browsing users = Approx max concurrent users * 5. As an example, a university with 500 total computers on campus and 100 concurrent users at any time will need approx 2GB of RAM on the one server to support the number of concurrent users.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note if you are using a hosted account&#039;&#039;&#039;: Ask your provider what limits are placed on the number of concurrent database connections and the processor load. This will give a good estimate of the number of users your Moodle install can manage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; As of August 31, 2007, the moodle 1.8.2+ codes are still not suitable for large installation, especially if you have large number (e.g. 20,000+) of courses. The main reason is the codes related to ROLES are still not fully optimized with database queries and still need some work. If you are planning to use 1.8.x codes for a larger institution, please make sure that you have sufficient time to do your own testing and performance profiling.&lt;br /&gt;
&lt;br /&gt;
[Update] This performance issue has been improved quite a bit in the most recent 1.8.3+ version (see this thread discussion: http://moodle.org/mod/forum/discuss.php?d=83281). However, you should still plan with caution if you are planning to use Moodle 1.8.x code base for larger installation.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Download and copy files into place ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to get Moodle, either as a compressed package or via CVS. &lt;br /&gt;
* There are two types of compressed packages on the  [http://download.moodle.org/ download page: http://download.moodle.org/], the standard distribution with Moodle only files and the [[Complete install packages|complete install]], which contains programs to operate Moodle in a web environment.  &lt;br /&gt;
* To use CVS, helpful instructions are available at the [[CVS_for_Administrators | CVS for Administrators]] page. The full [http://cvs.moodle.org/moodle/ Moodle CVS repository] is also available for browsing. &lt;br /&gt;
&lt;br /&gt;
After downloading, unpack the archive using either &lt;br /&gt;
 tar -zxvf [filename]&lt;br /&gt;
or&lt;br /&gt;
 unzip [filename]&lt;br /&gt;
as appropriate. &lt;br /&gt;
&lt;br /&gt;
If using CVS, run the CVS Checkout command.&lt;br /&gt;
&lt;br /&gt;
You will now be left with a directory called &amp;quot;moodle&amp;quot;, containing a number of files and folders.&lt;br /&gt;
&lt;br /&gt;
You can either place the whole folder in your web server documents directory, in which case the site will be located at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com/moodle&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;, or you can copy all the contents straight into the main web server documents directory, in which case the site will be simply &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourwebserver.com&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you are downloading Moodle to your local computer and then uploading it to your web site, it is usually better to upload the whole archive as one file, and then do the unpacking on the server. Even web hosting interfaces like cPanel allow you to uncompress archives in the &amp;quot;File Manager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Structure of moodle directory ===&lt;br /&gt;
&lt;br /&gt;
You can safely skip this section, but here is a quick summary of the contents of the Moodle folder, to help get you oriented:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;config.php&#039;&#039; - contains basic settings. This file does not come with Moodle - you will create it.&lt;br /&gt;
:&#039;&#039;install.php&#039;&#039; - the script you will run to create config.php&lt;br /&gt;
:&#039;&#039;version.php&#039;&#039; - defines the current version of Moodle code&lt;br /&gt;
:&#039;&#039;index.php&#039;&#039; - the front page of the site&lt;br /&gt;
:&#039;&#039;admin/&#039;&#039; - code to administrate the whole server&lt;br /&gt;
:&#039;&#039;auth/&#039;&#039; - plugin modules to authenticate users&lt;br /&gt;
:&#039;&#039;blocks/&#039;&#039; - plugin modules for the little side blocks on many pages&lt;br /&gt;
:&#039;&#039;calendar/&#039;&#039; - all the code for managing and displaying calendars&lt;br /&gt;
:&#039;&#039;course/&#039;&#039; - code to display and manage courses&lt;br /&gt;
:&#039;&#039;doc/&#039;&#039; - help documentation for Moodle (eg this page)&lt;br /&gt;
:&#039;&#039;files/&#039;&#039; - code to display and manage uploaded files&lt;br /&gt;
:&#039;&#039;lang/&#039;&#039; - texts in different languages, one directory per language&lt;br /&gt;
:&#039;&#039;lib/&#039;&#039; - libraries of core Moodle code&lt;br /&gt;
:&#039;&#039;login/&#039;&#039; - code to handle login and account creation&lt;br /&gt;
:&#039;&#039;mod/&#039;&#039; - all the main Moodle course modules are in here&lt;br /&gt;
:&#039;&#039;pix/&#039;&#039; - generic site graphics&lt;br /&gt;
:&#039;&#039;theme/&#039;&#039; - theme packs/skins to change the look of the site.&lt;br /&gt;
:&#039;&#039;user/&#039;&#039; - code to display and manage users&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Setting-up your system==&lt;br /&gt;
To ensure that Moodle will install successfully, you need to check that the web server settings are correct, then create a blank database for Moodle to use and finally create a directory on your hard disk for Moodle to save your materials and other files you upload into your courses.&lt;br /&gt;
&lt;br /&gt;
=== Check web server settings ===&lt;br /&gt;
&lt;br /&gt;
*Firstly, make sure that your web server is set up to use index.php as a default page (perhaps in addition to index.html, default.htm and so on). In Apache, this is done using a DirectoryIndex parameter in your httpd.conf file. Mine usually looks like this:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;DirectoryIndex&#039;&#039;&#039; index.php index.html index.htm&lt;br /&gt;
&lt;br /&gt;
:Just make sure index.php is in the list (and preferably towards the start of the list, for efficiency).&lt;br /&gt;
&lt;br /&gt;
*Secondly, &#039;&#039;&#039;if you are using Apache 2&#039;&#039;&#039;, then you should turn on the &#039;&#039;AcceptPathInfo&#039;&#039; variable, which allows scripts to be passed arguments like &amp;lt;nowiki&amp;gt;http://server/file.php/arg1/arg2&amp;lt;/nowiki&amp;gt;. This is essential to allow relative links between your resources, and also provides a performance boost for people using your Moodle web site. You can turn this on by adding these lines to your httpd.conf file.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;AcceptPathInfo&#039;&#039;&#039; on&lt;br /&gt;
&lt;br /&gt;
=== Check PHP settings ===&lt;br /&gt;
Moodle requires a number of PHP settings to be active for it to work. &#039;&#039;&#039;On most servers these will already be the default settings&#039;&#039;&#039;.  However, some PHP servers (and some of the more recent PHP versions) may have things set differently. These are defined in PHP&#039;s configuration file (usually called &#039;&#039;&#039;php.ini&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 magic_quotes_gpc = 1    (preferred but not necessary)&lt;br /&gt;
 magic_quotes_runtime = 0    (necessary)&lt;br /&gt;
 file_uploads = 1&lt;br /&gt;
 session.auto_start = 0&lt;br /&gt;
 session.bug_compat_warn = 0&lt;br /&gt;
&lt;br /&gt;
:You may also want to set other, optional php.ini file settings while you are already editing it. For instance, you may want to reset the maximum upload size of file attachments, which usually defaults to 2M(egabytes). For instance, to set these to 16 Megabytes:&lt;br /&gt;
 &lt;br /&gt;
 post_max_size = 16M&lt;br /&gt;
 upload_max_filesize = 16M&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Using a .htaccess file for webserver and PHP settings ===&lt;br /&gt;
&lt;br /&gt;
Use the above if you can directly edit your server&#039;s files, but if you are setting-up Moodle on a webhost, or don&#039;t have access to &#039;&#039;&#039;httpd.conf&#039;&#039;&#039; or &#039;&#039;&#039;php.ini&#039;&#039;&#039; on your server, or you have Moodle on a server with other applications that require different settings, then don&#039;t worry, you can often still override the default settings. This only works on Apache servers and only when Overrides have been allowed in the main Apache configuration.&lt;br /&gt;
&lt;br /&gt;
* Create a file called &#039;&#039;&#039;.htaccess&#039;&#039;&#039; in Moodle&#039;s main directory that contains lines like the following. &lt;br /&gt;
&lt;br /&gt;
 DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 php_flag magic_quotes_gpc 1&lt;br /&gt;
 php_flag magic_quotes_runtime 0&lt;br /&gt;
 php_flag file_uploads 1&lt;br /&gt;
 php_flag session.auto_start 0&lt;br /&gt;
 php_flag session.bug_compat_warn 0&lt;br /&gt;
&lt;br /&gt;
:If you have Apache version 2 installed, add these lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;IfDefine APACHE2&amp;gt;&lt;br /&gt;
     AcceptPathInfo on&lt;br /&gt;
 &amp;lt;/IfDefine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Otherwise add this single line:&lt;br /&gt;
&lt;br /&gt;
 AcceptPathInfo on&lt;br /&gt;
&lt;br /&gt;
* Optionally, you can also do things like define the maximum size for uploaded files, etc by adding these lines:&lt;br /&gt;
&lt;br /&gt;
 LimitRequestBody 0&lt;br /&gt;
 php_value upload_max_filesize 2M&lt;br /&gt;
 php_value post_max_size 2M&lt;br /&gt;
     &lt;br /&gt;
* The easiest thing to do is just copy the sample file from lib/htaccess and edit it to suit your needs. It contains further instructions. For example, in a Unix shell:&lt;br /&gt;
&lt;br /&gt;
 cp lib/htaccess .htaccess&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Use a .htaccess file only [http://httpd.apache.org/docs/1.3/howto/htaccess.html#when as a last resort] as it can have an impact on the performance of your Moodle site and cause pages to load slowly on your browser.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating an empty database ===&lt;br /&gt;
&lt;br /&gt;
You need to create an empty database (eg &amp;quot;&#039;&#039;moodle&#039;&#039;&amp;quot;) in your database system along with a special user (eg &amp;quot;moodleuser&amp;quot;) that has access to that database (and that database only). You could use the &amp;quot;root&amp;quot; user if you wanted to for a test server, but this is not recommended for a production system: if hackers manage to discover the password then your whole database system would be at risk, rather than just one database.&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;Warning&#039;&#039;&#039;: Bear in mind that, as of Moodle version 1.5.x, Moodle doesn&#039;t work with MySQL 5.x&#039;s strict mode setting (STRICT_TRANS_TABLES and/or STRICT_ALL_TABLES) -- see [http://moodle.org/mod/forum/discuss.php?d=58552 forum discussion]. So if you are using MySQL 5.x, edit MySQL&#039;s configuration file (called &amp;quot;my.ini&amp;quot; in Windows and &amp;quot;my.cnf&amp;quot; on Unix/Linux) and comment out that option or set it to &amp;lt;code&amp;gt;sql-mode=&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. You have to restart MySQL after changing this setting. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; If you do not have access to your server, use PHPMyAdmin (or another MySQL client) and enter the command &amp;lt;code&amp;gt;SET @@global.sql_mode=&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;;&amp;lt;/code&amp;gt; (be sure to use single quotes, and don&#039;t forget the semicolon).&lt;br /&gt;
&lt;br /&gt;
====Using a hosted server====&lt;br /&gt;
If you are using a webhost, they will probably have a control panel web interface for you to create your database.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;[http://www.cpanel.com/ cPanel]&#039;&#039;&#039; system is one of the most popular of these. To create a database in cPanel,&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;&#039;&#039;&#039;MySQL Databases&#039;&#039;&#039;&amp;quot; icon.&lt;br /&gt;
# Type &amp;quot;moodle&amp;quot; in the database field and click &amp;quot;&#039;&#039;&#039;Add Database&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
# Type a username and password (not one you use elsewhere) in the respective fields and click &amp;quot;&#039;&#039;&#039;Add User&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
# Now use the &amp;quot;&#039;&#039;&#039;Add User to Database&#039;&#039;&#039;&amp;quot; button to give this new user account &amp;quot;&#039;&#039;&#039;ALL&#039;&#039;&#039;&amp;quot; rights to the new database.&lt;br /&gt;
# Note that the username and database names may be prefixed by your cPanel account name. When entering this information into the Moodle installer - use the full names.&lt;br /&gt;
&lt;br /&gt;
====Using the command line====&lt;br /&gt;
&lt;br /&gt;
If you have access to Unix or Windows command lines then you can do the same sort of thing by typing commands. You should do this using the MySQL Client program as follows (commands which you type-in are shown in bold):&lt;br /&gt;
&lt;br /&gt;
- Start the MySQL Client program:&lt;br /&gt;
 #&#039;&#039;&#039;mysql -u root -p&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 2 to server version: 5.0.22-log&lt;br /&gt;
 &lt;br /&gt;
 Type &#039;help;&#039; or &#039;\h&#039; for help. Type &#039;\c&#039; to clear the buffer.&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- The prompt changes to &amp;quot;mysql&amp;gt;&amp;quot; to indicate that you are now working in the MySQL Client program. When working in MySQL, all commands which you type-in must end in a semi-colon. (If you hit the Enter key without the final semi-colon, you&#039;ll get the line continuation symbol &#039;-&amp;gt;&#039;; this is your second chance to type the semi-colon and hit Enter.) &lt;br /&gt;
&lt;br /&gt;
- Begin by checking for any existing databases called &amp;quot;moodle&amp;quot; - if there are any you should change the name in all the commands which follow:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;SHOW DATABASES;&#039;&#039;&#039;&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | Database                |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 | information_schema      |&lt;br /&gt;
 | mysql                   |&lt;br /&gt;
 | test                    |&lt;br /&gt;
 +-------------------------+&lt;br /&gt;
 3 rows in set (0.03 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a database to store the Moodle tables. We&#039;ll call this &amp;quot;moodle&amp;quot;, as there are none with that name already in the above list, but change it if you need to.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;CREATE DATABASE moodle;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Change the default character set and collation of the &amp;quot;moodle&amp;quot; database to UTF8. Leave this out if you are installing Moodle 1.5 or earlier):&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
- Create a username and password to access the database &amp;quot;moodle&amp;quot; and grant database access permissions. We&#039;ll call the user &amp;quot;moodleuser&amp;quot; and set the password as &amp;quot;yourpassword&amp;quot;. It&#039;s a good idea to change these for your installation however most people keep the username as &amp;quot;moodleuser&amp;quot;. Remember the username and password you have set, as you&#039;ll need it in the configuration screens later. This is a long command so has been split over several lines by pressing the Return key.&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;DROP,INDEX,ALTER ON moodle.*&#039;&#039;&#039;&lt;br /&gt;
     -&amp;gt; &#039;&#039;&#039;TO moodleuser@localhost IDENTIFIED BY &#039;yourpassword&#039;;&#039;&#039;&#039;&lt;br /&gt;
 Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Security Warnings&#039;&#039;&#039;: Never leave the password as the one shown here. Make sure you have a strong password (a mixture of letters and numbers, upper and lower case). Avoid granting &amp;quot;ALL&amp;quot; permissions on the database.&lt;br /&gt;
: &#039;&#039;&#039;Note&#039;&#039;&#039;: For MySQL 4.0.1 or earlier, you don&#039;t need the CREATE TEMPORARY TABLES permission. &lt;br /&gt;
&lt;br /&gt;
- Exit the MySQL Client program:&lt;br /&gt;
 mysql&amp;gt; &#039;&#039;&#039;QUIT&#039;&#039;&#039;&lt;br /&gt;
 Bye&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
- Reload the grant tables using the mysqladmin program:&lt;br /&gt;
 #&#039;&#039;&#039;mysqladmin -u root -p reload&#039;&#039;&#039;&lt;br /&gt;
 Enter password:&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
And some example command lines for PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
   # su - postgres&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create user moodleuser createdb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;create database moodle &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;with encoding &#039;unicode&#039;&amp;lt;/font&amp;gt;;&amp;quot; -U moodleuser template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser nocreatedb;&amp;quot; template1&lt;br /&gt;
   &amp;gt; psql -c &amp;quot;alter user moodleuser with encrypted password &#039;yourpassword&#039;;&amp;quot; template1&lt;br /&gt;
   &amp;gt; su - root&lt;br /&gt;
   # /etc/init.d/postgresql reload&lt;br /&gt;
&lt;br /&gt;
If the Postgres create database command above (&amp;gt;psql -c &amp;quot;create database moodle...&amp;quot;) gives an error message you may want to try:&lt;br /&gt;
 psql -c &amp;quot;create database moodle with template=template1 encoding = &#039;unicode&#039; owner =  moodleuser &amp;lt;br&amp;gt;     location = &#039;/var/mydata&#039;;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If the create database command asks you for a password, run the line containing &#039;encrypted password&#039; first before proceeding.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
* Step-by-step instructions on  [https://docs.moodle.org/en/Step-by-step_Install_Guide_for_Ubuntu installation for Ubuntu(Debian)]&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the data directory (moodledata) ===&lt;br /&gt;
&lt;br /&gt;
Moodle will also need some space on your server&#039;s hard disk to store uploaded files, such as course documents and user pictures. The Moodle installer tries hard to create this directory for you but if it fails then you will have to create a directory for this purpose manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Security warning&#039;&#039;&#039;: For security purposes, it&#039;s best that this directory is NOT accessible directly via the web. The easiest way to do this is to simply locate it OUTSIDE the web directory, but if you must have it in the web directory (and you are using Apache) then protect it by creating a file in the data directory called &#039;&#039;&#039;.htaccess&#039;&#039;&#039;, containing these lines:&lt;br /&gt;
&lt;br /&gt;
 order deny,allow&lt;br /&gt;
 deny from all&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ownership &amp;amp; Permissions&#039;&#039;&#039;: To make sure that Moodle can save uploaded files in this directory, check that the web server software has permission to read, write and execute in this directory. On Unix machines, this means setting the owner of the directory to be something like &amp;quot;nobody&amp;quot; or &amp;quot;apache&amp;quot;, and then giving that user read, write and execute permissions. As an example, to change the owner to &amp;quot;nobody&amp;quot; you could use:&lt;br /&gt;
&lt;br /&gt;
 chown -R nobody:apache moodledata&lt;br /&gt;
&lt;br /&gt;
To change the permissions so that the owner has read,write and execute permissions, use something like this:&lt;br /&gt;
&lt;br /&gt;
 chmod -R 0770 moodledata&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: If you are receiving permission denied messages, try &#039;&#039;chmod -R 0770 moodledata&#039;&#039; and then adjust the settings so that they are more secure. A more secure setting is &#039;&#039;chmod -R 0750 moodledata&#039;&#039;. According to the comments in config-dist.php, &amp;quot;On hosting systems you might need to make sure that your group has no permissions at all while others have full permissions.&amp;quot; To do this you could use &#039;&#039;chmod -R 707 moodledata&#039;&#039;. See also the [[Security | security page]].&lt;br /&gt;
&lt;br /&gt;
Remember that by default moodle will issue a warning about moodle data directories created inside the web directory, but otherwise this directory can be located where you wish. You can later move or change the location of this directory, but if you do, be sure to edit the setting in the &#039;&#039;&#039;config.php&#039;&#039;&#039; file that sets this; e.g. if moodledata is under a directory called data, then it would look like this:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/data/moodledata&#039;;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CPanel and webhosts&#039;&#039;&#039;: On cPanel systems you can use the &amp;quot;File Manager&amp;quot; to find the folder, click on it, then choose &amp;quot;Change Permissions&amp;quot;. On many shared hosting servers, you will probably need to restrict all file access to your &amp;quot;group&amp;quot; (to prevent other webhost customers from looking at or changing your files), but provide full read/write access to everyone else (which will allow the web server to access your files). Speak to your server administrator if you are having trouble setting this up securely. In particular it will not be possible to create a usable data directory on sites that use a PHP feature known as &amp;quot;&#039;&#039;&#039;Safe Mode&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Run the installer script to create config.php ==&lt;br /&gt;
&lt;br /&gt;
To run the installer script (install.php), just try to access your Moodle main URL using a web browser, or access &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;http://yourserver/install.php&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039; directly.&lt;br /&gt;
&lt;br /&gt;
(The Installer will try to set a session cookie. If you get a popup warning in your browser make sure you accept that cookie!)&lt;br /&gt;
&lt;br /&gt;
Moodle will detect that configuration is necessary and will lead you through some screens to help you create a new configuration file called &#039;&#039;&#039;config.php&#039;&#039;&#039;. At the end of the process Moodle will try and write the file into the right location, otherwise you can press a button to download it from the installer and then upload &#039;&#039;&#039;config.php&#039;&#039;&#039; into the main Moodle directory on the server.&lt;br /&gt;
&lt;br /&gt;
Along the way the installer will test your server environment and give you suggestions about how to fix any problems. For most common issues these suggestions should be sufficient, but if you get stuck, check in the Installation Forum for more help.&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Go to the admin page to continue configuration ==&lt;br /&gt;
&lt;br /&gt;
Once the basic config.php has been correctly created in the previous step, trying to access the front page of your site will take you to the &amp;quot;admin&amp;quot; page for the rest of the configuration.&lt;br /&gt;
&lt;br /&gt;
The first time you access this admin page, you will be presented with a GPL &amp;quot;shrink wrap&amp;quot; agreement with which you must agree before you can continue with the setup.&lt;br /&gt;
&lt;br /&gt;
Now Moodle will start setting up your database and creating tables to store data. Firstly, the main database tables are created. You should see a number of SQL statements followed by status messages that look like this:&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE course (&lt;br /&gt;
    id int(10) unsigned NOT NULL auto_increment,&lt;br /&gt;
    category int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    password varchar(50) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    fullname varchar(254) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    shortname varchar(15) NOT NULL default &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
    summary text NOT NULL,&lt;br /&gt;
    format tinyint(4) NOT NULL default &#039;1&#039;,&lt;br /&gt;
    teacher varchar(100) NOT NULL default &#039;Teacher&#039;,&lt;br /&gt;
    startdate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    enddate int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    timemodified int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
    PRIMARY KEY (id)&lt;br /&gt;
 ) TYPE=MyISAM;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;SUCCESS&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and so on, followed by: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Main databases set up successfully.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see these, then there must have been some problem with the database or the configuration settings you defined in config.php. Check that PHP isn&#039;t in a restricted &amp;quot;Safe Mode&amp;quot; (commercial web hosts sometimes have safe mode turned on). You can check PHP variables by creating a little file containing &#039;&#039;&#039;&amp;lt;?php phpinfo() ?&amp;gt;&#039;&#039;&#039; and looking at it through a browser. Check all these and try this page again.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
You should now see a form where you can define more configuration variables for your installation, such as the default language, SMTP hosts and so on. Don&#039;t worry too much about getting everything right just now - you can always come back and edit these later on using the admin interface. The defaults are designed to be useful and secure for most sites. Scroll down to the bottom and click &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If (and only if) you find yourself getting stuck on this page, unable to continue, then your server probably has what I call the &amp;quot;buggy referrer&amp;quot; problem. This is easy to fix: just turn off the &amp;quot;secureforms&amp;quot; setting, then try to continue again.&lt;br /&gt;
&lt;br /&gt;
Next you will see more pages that print lots of status messages as they set up all the tables required by the various Moodle module. As before, they should all be &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;green&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Scroll down the very bottom of the page and press the &amp;quot;Continue&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
The next page is a form where you can define parameters for your Moodle site and the front page, such as the name, format, description and so on. Fill this out (you can always come back and change these later) and then press &amp;quot;Save changes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Finally, you will then be asked to create a top-level administration user for future access to the admin pages. Fill out the details with your own name, email etc and then click &amp;quot;Save changes&amp;quot;. Not all the fields are required, but if you miss any important fields you&#039;ll be re-prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you remember the username and password you chose for the administration user account, as they will be necessary to access the administration page in future.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(If for any reason your install is interrupted, or there is a system error of some kind that prevents you from logging in using the admin account, you can usually log in using the default username of &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;, with password &amp;quot;&#039;&#039;&#039;admin&#039;&#039;&#039;&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
Once successful, you will be returned to the home page of your new site! Note the administration links that appear down the left hand side of the page (these items also appear on a separate Admin page) - these items are only visible to you because you are logged in as the admin user. All your further administration of Moodle can now be done using this menu, such as:&lt;br /&gt;
&lt;br /&gt;
* creating and deleting courses&lt;br /&gt;
* creating and editing user accounts&lt;br /&gt;
* administering teacher accounts&lt;br /&gt;
* changing site-wide settings like themes etc&lt;br /&gt;
&lt;br /&gt;
But you are not done installing yet! There is one very important thing still to do (see the next section on cron).&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Set up cron ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[Cron|Cron instructions]].&lt;br /&gt;
&lt;br /&gt;
== Set up backups ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[Backup settings| backup instructions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Installing_Moodle#Table_of_Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
== Create a new course ==&lt;br /&gt;
&lt;br /&gt;
Now that Moodle is running properly, you can try creating a new course to play with.&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Create a new course&amp;quot; from the Admin page (or the admin links on the home page).&lt;br /&gt;
&lt;br /&gt;
Fill out the form, paying special attention to the course format. You don&#039;t have to worry about the details too much at this stage, as everything can be changed later by the teacher. Note that the yellow help icons are everywhere to provide contextual help on any aspect.&lt;br /&gt;
&lt;br /&gt;
Press &amp;quot;Save changes&amp;quot;, and you will be taken to a new form where you can assign teachers to the course. You can only add existing user accounts from this form - if you want to create a new teacher account then either ask the teacher to create one for themselves (see the login page), or create one for them using the &amp;quot;Add a new user&amp;quot; on the Admin page.&lt;br /&gt;
&lt;br /&gt;
Once done, the course is ready to customize, and is accessible via the &amp;quot;Courses&amp;quot; link on the home page.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Installation FAQ]]&lt;br /&gt;
*[[Complete install packages]] might be an easier first time installs on some systems&lt;br /&gt;
* [[Installing Apache, MySQL and PHP]] - Open source programs that can run Moodle on the web or on a desktop&lt;br /&gt;
* [[Upgrading Moodle]]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=42688 Selecting a web host for Moodle] forum discussion&lt;br /&gt;
* [[masquerading|Masquerading]] - Running Moodle behind a masquerading/NAT firewall&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[cs:Instalace]]&lt;br /&gt;
[[de:Installieren von Moodle]]&lt;br /&gt;
[[es:Instalación de moodle]]&lt;br /&gt;
[[fr:Installation de Moodle]]&lt;br /&gt;
[[ja:Moodleのインストール]]&lt;br /&gt;
[[nl:Installatiegids]]&lt;br /&gt;
[[pl:Instalacja Moodle]]&lt;br /&gt;
[[pt:Instalação do Moodle]]&lt;br /&gt;
[[ru:Установка Moodle]]&lt;br /&gt;
[[sk:Inštalácia]]&lt;br /&gt;
[[zh:安装Moodlezh:]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Administration_FAQ&amp;diff=31276</id>
		<title>Talk:Administration FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Administration_FAQ&amp;diff=31276"/>
		<updated>2008-01-14T11:31:36Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: Re: Incomplete Page Displayed When I Click &amp;quot;Turn Editing On&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Re. Preventing &amp;quot;Welcome to the course&amp;quot; Emails ===&lt;br /&gt;
I suggest this is removed, as it is a hack, rather than an explanation of standard Moodle features. Perhaps it could be moved to [[Administration hacks]]? [[User:Helen|Helen]] 2 December 2005 08:12 (WST)&lt;br /&gt;
&lt;br /&gt;
== Re: Incomplete Page Displayed When I Click &amp;quot;Turn Editing On&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Shouldn&#039;t we at least mention the fact that if you find a problem with a block or module, you need to delete it in the admin menu, not just remove the folder ([https://docs.moodle.org/en/Category:Modules_%28non-standard%29#Module_removal])? --[[User:Richard Enison|Richard Enison]] 05:31, 14 January 2008 (CST)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Installation_FAQ&amp;diff=30864</id>
		<title>Talk:Installation FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Installation_FAQ&amp;diff=30864"/>
		<updated>2008-01-04T14:00:59Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: Added section on debugging before config.php created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I just added a bunch of questions/answers to the generic FAQ page, and then looked at this to see how it was done (backwards, I know). Clicking on the item jumps you down to the question... but should we add a link to jump back to the top? -- D.I. 29jan06&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
Someone said, under : My pages show fatal errors such as : Parse error, call to undefined function: get_string()&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You may also be running a php script which uses short open tags, e.g. instead of &amp;lt;?PHP ?&amp;gt; it uses &amp;lt;? ?&amp;gt;. Either replace short tags with conventional ones, or set this line in php.ini:&lt;br /&gt;
&lt;br /&gt;
&amp;quot; short_open_tag = On&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, this should never be necessary with Moodle code. If you find any short tags anywhere, file a bug in the [http://moodle.org/bugs/ bug tracker] against the affected code. There are currenly none of these abominations anywhere in the Moodle core code.[[User:Tim Hunt|Tim Hunt]] 01:19, 26 July 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
Agreed. Such an &amp;quot;abomination&amp;quot; should not be in Moodle core code but the person who deleted it doesn&#039;t appreciate the point. This comment was added to help those who are having problems with code which is &#039;&#039;&#039;not&#039;&#039;&#039; part of Moodle core, e.g some of the third party blocks which are mentioned frequently in forums. There is no reason, IMHO, why fellow Moodlers in such a predicament would not turn to this FAQ for help. - Ken Wilson 25 July 06&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
Sorry, my mistake. I had not reallised that this actually happened with contrib modules. I&#039;ll reinstate the that bit (but keep my point about reporting the problem so it can be fixed).[[User:Tim Hunt|Tim Hunt]] 01:19, 26 July 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
== Memory limit limitations ==&lt;br /&gt;
&lt;br /&gt;
Each method of increasing memory limit has limitations. &lt;br /&gt;
;.htaccess : directive &#039;&#039;php_value memory_limit&#039;&#039; may be disabled by the host&lt;br /&gt;
; php.ini : no root access&lt;br /&gt;
&amp;lt;u&amp;gt;There is a third way which may or may not work:&amp;lt;/u&amp;gt;&lt;br /&gt;
; php function &#039;&#039;ini_set&#039;&#039; : Example: ini_set(&amp;quot;memory_limit&amp;quot;,&amp;quot;24M&amp;quot;);&lt;br /&gt;
: It will not work if phpinfo() does &#039;&#039;&#039;not&#039;&#039;&#039; show Configure Command &#039;--enable-memory-limit&#039;&lt;br /&gt;
: see http://us.php.net/manual/en/ini.core.php#ini.memory-limit&lt;br /&gt;
&lt;br /&gt;
On my host, none of the three methods will work. I am limited to 8M memory per PHP session. I am able run the basic installation.  I haven&#039;t seen the dreaded error &amp;quot;&#039;&#039;Allowed memory size of Xxx bytes exhausted&#039;&#039;&amp;quot; but I expect it at some point.&lt;br /&gt;
 &lt;br /&gt;
--[[User:John Walling|John Walling]] 14:56, 11 May 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
== PHP Debugging Configuration Confusion ==&lt;br /&gt;
&lt;br /&gt;
The FAQ about getting a blank page during installation refers the reader to the FAQ about checking your error logs, which tells him/her to add ini_set calls to config.php if using Moodle 1.7 or higher. Problem is, during installation &#039;&#039;there is no config.php file&#039;&#039;! This leaves the reader in a quandry, and so the instructions should be clarified. See http://moodle.org/mod/forum/discuss.php?d=87473&lt;br /&gt;
&lt;br /&gt;
--[[User:Richard Enison|Richard Enison]] 08:00, 4 January 2008 (CST)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Moodle_migration&amp;diff=30669</id>
		<title>Talk:Moodle migration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Moodle_migration&amp;diff=30669"/>
		<updated>2007-12-27T00:02:41Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: Query about dirroot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Does anyone know why there is no mention of changing dirroot on this page? --[[User:Richard Enison|Richard Enison]] 18:02, 26 December 2007 (CST)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Moodle_migration&amp;diff=30287</id>
		<title>Moodle migration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Moodle_migration&amp;diff=30287"/>
		<updated>2007-12-16T06:45:21Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: /* See also */  added reference on internal/external access&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are times when you will need to move your Moodle site from one server to another. This is known as migrating your Moodle site and occurs when you need to change the &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; value in your Moodle &#039;&#039;config.php&#039;&#039;. The process is divided into the following tasks:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Upgrade Moodle==&lt;br /&gt;
&lt;br /&gt;
When migrating Moodle it is often a good idea to take the opportunity to upgrade Moodle to the latest version. If you manage your own server, follow the instructions in [[Upgrading | upgrading moodle]], otherwise check if your host can upgrade for you.&lt;br /&gt;
&lt;br /&gt;
==Restore a single course==&lt;br /&gt;
&lt;br /&gt;
You may need to restore a single course from an old site to a new one, especially if you are testing the migration. When restoring a Moodle backup file to Moodle on a different server than the one used to create the backup, the absolute referenced links to files maybe broken. To fix this problem open the &#039;&#039;backup-coursename.zip&#039;&#039; file and edit the &#039;&#039;moodle.xml&#039;&#039; file replacing links with &amp;lt;code&amp;gt;$@FILEPHP@$&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example, replace &amp;lt;nowiki&amp;gt;http://yourserver.com/file.php/243/&amp;lt;/nowiki&amp;gt; with &amp;lt;code&amp;gt;$@FILEPHP@$&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
When the file is restored it will use the correct file path for the new course.&lt;br /&gt;
&lt;br /&gt;
==Migrating a complete Moodle site==&lt;br /&gt;
&lt;br /&gt;
This involves moving a whole site from one server to another. If you are changing the domain/IP address to the new server you need to do these steps:&lt;br /&gt;
* &#039;&#039;&#039;Maintenance mode&#039;&#039;&#039;. Place your current Moodle site in maintenance mode to prevent any further additions to the Moodle database. Don&#039;t let administrators login during the migration as they are not affected by the maintenance mode setting.&lt;br /&gt;
* &#039;&#039;&#039;Backup your current Moodle database&#039;&#039;&#039;. Do this by following the instructions in the [[Upgrading | upgrading Moodle]] page. This will give you a text file containing the mysql dump.&lt;br /&gt;
* &#039;&#039;&#039;Copy the Moodle software&#039;&#039;&#039;. You will need to copy the Moodle code itself to the new server - upgrade the code to the latest version if you can.&lt;br /&gt;
* &#039;&#039;&#039;Change &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt;&#039;&#039;&#039;. In your (possibly new) Moodle directory, change the &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; variable in the &#039;&#039;config.php&#039;&#039; file for the new server.&lt;br /&gt;
* &#039;&#039;&#039;Copy data directory contents (moodledata)&#039;&#039;&#039;. Copy the contents of your data directory (check for the value in &amp;lt;code&amp;gt;$CFG-&amp;gt;dataroot&amp;lt;/code&amp;gt;) to the new server. Check also that permissions remain the same on the new dataroot folder and change the value if you have changed its location on the new server.&lt;br /&gt;
* &#039;&#039;&#039;Change your Moodle URL&#039;&#039;&#039;. If you have a new URL, you&#039;ll need to change this in the Moodle database to the new server. This is needed as links to pictures, files, etc are stored as absolute links and will reference the old &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; value. So when loading a mysql backup dump of the Moodle server into mysql on another server the absolute referenced links will be broken. There are two methods of doing this:&lt;br /&gt;
:(a) The first method changes the Moodle URL using the Moodle script &#039;&#039;replace.php&#039;&#039; while your site is currently running just before you backup the Moodle database. Point your browser to &amp;lt;nowiki&amp;gt;http://yourserver.com/admin/replace.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Enter the url for your old server (&amp;lt;nowiki&amp;gt;http://oldserver.com/&amp;lt;/nowiki&amp;gt;) and new server (&amp;lt;nowiki&amp;gt;http://newserver.com/&amp;lt;/nowiki&amp;gt;) and it will fix the mysql tables. You will also need to clear out any cached links by restarting your webserver. Now, take another backup of the Moodle database - this one will have the correct URLs.&lt;br /&gt;
&lt;br /&gt;
:(b) The second method is to backup the Moodle database first, then use the search and replace feature of your text editor (or use a unix tool like sed) to replace the old URL with the new one in the mysql backup file. Here is an example sed command:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;#sed -e &#039;s/oldserver.com/newserver.com/&#039; oldmysqldump.sql &amp;gt; newmysqldump.sql&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Tip&#039;&#039;&#039;: You may want to check the mysqldump file to see how the old server was referenced.&lt;br /&gt;
:After changing the URL, restore the mysql database&lt;br /&gt;
* &#039;&#039;&#039;Test the migration&#039;&#039;&#039;. To test the new install, access Moodle using your browser and the new server&#039;s URL. When you have tested that a number of links in the courses work, take the new Moodle site out of maintenance mode.&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: [http://moodle.org/mod/forum/discuss.php?d=85812 Forum discussion] on migrating Moodle&#039;s data directory on a Windows system.&lt;br /&gt;
&lt;br /&gt;
==DNS changes==&lt;br /&gt;
&lt;br /&gt;
You may have had to change the DNS entries for the new Moodle site. If you have done so, it will take some time for the changes to replicate, so be patient.&lt;br /&gt;
&lt;br /&gt;
==Internal and external access==&lt;br /&gt;
&lt;br /&gt;
Lastly, check that the new site can be accessed internally and externally.  &lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=62959 Changing Moodle URL] forum discussion&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=57477 Changing site address] forum discussion&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=76704 Upgrading whilst migrating] forum discussion&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=65450 Internal and external access] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Migration de Moodle]]&lt;br /&gt;
[[nl:Moodle verhuizen]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Arguments_in_favour_of_PostgreSQL&amp;diff=29265</id>
		<title>Talk:Arguments in favour of PostgreSQL</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Arguments_in_favour_of_PostgreSQL&amp;diff=29265"/>
		<updated>2007-11-26T07:33:12Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: Clarifying questions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Michael Who?&lt;br /&gt;
Richard Who?&lt;br /&gt;
--[[User:Richard Enison|Richard Enison]] 01:33, 26 November 2007 (CST)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:admin/environment/php_extension/mbstring&amp;diff=29261</id>
		<title>Talk:admin/environment/php extension/mbstring</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:admin/environment/php_extension/mbstring&amp;diff=29261"/>
		<updated>2007-11-26T01:48:21Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;See http://moodle.org/mod/forum/discuss.php?d=84775#p374748&lt;br /&gt;
&lt;br /&gt;
:Richard, thanks for your forum posting. If you notice any mistakes in the documentation, please feel free to fix them. --[[User:Helen Foster|Helen Foster]] 02:45, 19 November 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
For some reason I had the wrong link at the top of this comments page. I have fixed it. And my response to HF is in http://moodle.org/mod/forum/discuss.php?d=84775#p374809 [[User:Richard Enison|Richard Enison]] 15:48, 19 November 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
I couldn&#039;t take it anymore, so I at least corrected the scope of the page. --[[User:Richard Enison|Richard Enison]] 19:48, 25 November 2007 (CST)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:admin/environment/php_extension/iconv&amp;diff=29260</id>
		<title>Talk:admin/environment/php extension/iconv</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:admin/environment/php_extension/iconv&amp;diff=29260"/>
		<updated>2007-11-26T01:47:19Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;See http://moodle.org/mod/forum/discuss.php?d=84775#p374748&lt;br /&gt;
&lt;br /&gt;
:Richard, thanks for your forum posting. If you notice any mistakes in the documentation, please feel free to fix them. --[[User:Helen Foster|Helen Foster]] 02:44, 19 November 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
For some reason I had the wrong link at the top of this comments page. I have fixed it. And my response to HF is in http://moodle.org/mod/forum/discuss.php?d=84775#p374809&lt;br /&gt;
&lt;br /&gt;
I couldn&#039;t take it anymore, so I at least corrected the scope of the page. --[[User:Richard Enison|Richard Enison]] 19:47, 25 November 2007 (CST)&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=admin/environment/php_extension/iconv&amp;diff=29259</id>
		<title>admin/environment/php extension/iconv</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=admin/environment/php_extension/iconv&amp;diff=29259"/>
		<updated>2007-11-26T01:45:09Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: removed false impression that enabling effects installation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To enable iconv in Windows package installations of Moodle: &lt;br /&gt;
&lt;br /&gt;
#Open the &#039;&#039;php.ini&#039;&#039; file found in the &#039;&#039;moodle/apache/bin&#039;&#039; folder&lt;br /&gt;
#Find the line: &amp;lt;code&amp;gt;;extension=php_iconv.dll&amp;lt;/code&amp;gt;&lt;br /&gt;
#Remove the &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt; at the beginning of the line&lt;br /&gt;
#Restart apache for the change to take effect.&lt;br /&gt;
&lt;br /&gt;
This page needs to be enhanced by adding corresponding instructions for other kinds of Moodle installations.&lt;br /&gt;
&lt;br /&gt;
[[Category:Environment|PHP]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=admin/environment/php_extension/mbstring&amp;diff=29258</id>
		<title>admin/environment/php extension/mbstring</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=admin/environment/php_extension/mbstring&amp;diff=29258"/>
		<updated>2007-11-26T01:43:54Z</updated>

		<summary type="html">&lt;p&gt;Hccrle: corrected scope of instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To enable the mbstring library in Windows package installations of Moodle:&lt;br /&gt;
&lt;br /&gt;
# Open the &#039;&#039;php.ini&#039;&#039; file found in the &#039;&#039;moodle/apache/bin&#039;&#039; folder or Windows folder&lt;br /&gt;
# Find the line: &amp;lt;code&amp;gt;;extension=php_mbstring.dll&amp;lt;/code&amp;gt;&lt;br /&gt;
# Remove the &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt; at the beginning of the line&lt;br /&gt;
# Restart apache if necessary&lt;br /&gt;
&lt;br /&gt;
This page needs to be enhanced by adding corresponding instructions for other kinds of Moodle installations.&lt;br /&gt;
&lt;br /&gt;
[[Category:Environment|php extension]]&lt;/div&gt;</summary>
		<author><name>Hccrle</name></author>
	</entry>
</feed>