<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl">
	<id>https://docs.moodle.org/2x/pl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matthewm1970</id>
	<title>MoodleDocs - Wkład użytkownika [pl]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/2x/pl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matthewm1970"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/Specjalna:Wk%C5%82ad/Matthewm1970"/>
	<updated>2026-05-31T07:11:11Z</updated>
	<subtitle>Wkład użytkownika</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Parent_role&amp;diff=79172</id>
		<title>Parent role</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Parent_role&amp;diff=79172"/>
		<updated>2010-12-14T18:31:15Z</updated>

		<summary type="html">&lt;p&gt;Matthewm1970: /* Viewing activity reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The role of &#039;&#039;&#039;Parent&#039;&#039;&#039; may be used to provide parents/mentors/tutors with permission to view certain information, such as activity reports, grades, blog entries and forum posts, about their children/mentees/tutees.&lt;br /&gt;
&lt;br /&gt;
==Role set-up==&lt;br /&gt;
&lt;br /&gt;
#Access &#039;&#039;Administration &amp;gt; Users &amp;gt; Permissions &amp;gt; Define roles&#039;&#039;&lt;br /&gt;
#Click the button &amp;quot;Add a new role&amp;quot;&lt;br /&gt;
#Give the role a name e.g. Parent, short name and description&lt;br /&gt;
#Change [[Capabilities/moodle/user:viewdetails|moodle/user:viewdetails]] to &#039;&#039;allow&#039;&#039; - this item is listed within the &#039;Course&#039; section in 1.9&lt;br /&gt;
#Change any/all of the following capabilities to &#039;&#039;allow&#039;&#039;&lt;br /&gt;
#*[[Capabilities/moodle/user:readuserblogs|moodle/user:readuserblogs]] - to read the child&#039;s blog entries&lt;br /&gt;
#*[[Capabilities/moodle/user:readuserposts|moodle/user:readuserposts]] - to read the child&#039;s forum posts&lt;br /&gt;
#*[[Capabilities/moodle/user:viewuseractivitiesreport|moodle/user:viewuseractivitiesreport]] - to view the child&#039;s activity reports and grades&lt;br /&gt;
#*[[Capabilities/moodle/user:editprofile|moodle/user:editprofile]] - to edit the child&#039;s profile&lt;br /&gt;
#Click the button &amp;quot;Add a new role&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Role assignment==&lt;br /&gt;
&lt;br /&gt;
#Access the child&#039;s profile page and click on the Roles tab i.e. assign the role in the user context&lt;br /&gt;
#Choose the role to assign i.e. Parent&lt;br /&gt;
#Select the parent in the potential users list, and use the left-facing arrow button to add it to the existing users list&lt;br /&gt;
The same parent may be assigned to several children.&lt;br /&gt;
===Adding multiple role assignments at once===&lt;br /&gt;
(if you are interested in assigning several parent roles &#039;&#039;en masse&#039;&#039; read the discussion at http://moodle.org/mod/forum/discuss.php?d=70539#p345127)&lt;br /&gt;
&lt;br /&gt;
==Mentees block==&lt;br /&gt;
{{Moodle 1.8}}&lt;br /&gt;
The [[Mentees block]] provides a parent with quick access to their child&#039;s profile page via a link on the site front page.&lt;br /&gt;
#On the site front page click &amp;quot;Turn editing on&amp;quot;&lt;br /&gt;
#Choose Mentees from the Add a block drop-down menu&lt;br /&gt;
#If required, give the Mentees block a title by following the block configuration/edit link&lt;br /&gt;
&lt;br /&gt;
==Viewing activity reports==&lt;br /&gt;
&lt;br /&gt;
If the capability [[Capabilities/moodle/user:viewuseractivitiesreport|moodle/user:viewuseractivitiesreport]] is set to &#039;&#039;allow&#039;&#039; then a parent/mentee may view their student&#039;s activity reports and grades via the student&#039;s Profile.   &lt;br /&gt;
&lt;br /&gt;
On the main Profile page, there will be a list of courses.  Clicking on a course title will select that course.  Then, under the Activities tab, the various report and grades sub-tabs will display information relevant to the selected course.   You can easily change which course you are reviewing by selecting another one on the main Profile tab.&lt;br /&gt;
&lt;br /&gt;
One small hack that can make the course list a bit more readable, especially for long course lists, is to change the format to a vertical list:&lt;br /&gt;
&lt;br /&gt;
* Edit the moodle/user/view.php file and look for these lines (around line 349 in my 1.9.9 installation):&lt;br /&gt;
&amp;lt;code php&amp;gt;. format_string($mycourse-&amp;gt;fullname) . &amp;quot;&amp;lt;/a&amp;gt;, &amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else {&lt;br /&gt;
$courselisting .= format_string($mycourse-&amp;gt;fullname) . &amp;quot;, &amp;quot;;&amp;lt;/code&amp;gt;&lt;br /&gt;
* and change that to :&lt;br /&gt;
&amp;lt;code php&amp;gt;. format_string($mycourse-&amp;gt;fullname) . &amp;quot;&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else {&lt;br /&gt;
$courselisting .= format_string($mycourse-&amp;gt;fullname) . &amp;quot;&amp;lt;br&amp;gt;&amp;quot;;;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Then save&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Manage roles]] - including testing a new role&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=57812 Create a Parent of a student role] forum discussion &lt;br /&gt;
*[http://www.youtube.com/watch?v=-49YrtjMTTo Setting up a Parent Role video]&lt;br /&gt;
*[http://www.youtube.com/watch?v=P23GT2peLZI Parent Signing in on Moodle video]&lt;br /&gt;
&lt;br /&gt;
[[Category:Roles]]&lt;br /&gt;
&lt;br /&gt;
[[eu:Guraso_rola]]&lt;br /&gt;
[[fr:Rôle Parent]]&lt;br /&gt;
[[ja:親ロール]]&lt;br /&gt;
[[de:Eltern-Rolle]]&lt;br /&gt;
[[nl:Ouder Rol]]&lt;/div&gt;</summary>
		<author><name>Matthewm1970</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Parent_role&amp;diff=79170</id>
		<title>Parent role</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Parent_role&amp;diff=79170"/>
		<updated>2010-12-14T17:44:38Z</updated>

		<summary type="html">&lt;p&gt;Matthewm1970: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The role of &#039;&#039;&#039;Parent&#039;&#039;&#039; may be used to provide parents/mentors/tutors with permission to view certain information, such as activity reports, grades, blog entries and forum posts, about their children/mentees/tutees.&lt;br /&gt;
&lt;br /&gt;
==Role set-up==&lt;br /&gt;
&lt;br /&gt;
#Access &#039;&#039;Administration &amp;gt; Users &amp;gt; Permissions &amp;gt; Define roles&#039;&#039;&lt;br /&gt;
#Click the button &amp;quot;Add a new role&amp;quot;&lt;br /&gt;
#Give the role a name e.g. Parent, short name and description&lt;br /&gt;
#Change [[Capabilities/moodle/user:viewdetails|moodle/user:viewdetails]] to &#039;&#039;allow&#039;&#039; - this item is listed within the &#039;Course&#039; section in 1.9&lt;br /&gt;
#Change any/all of the following capabilities to &#039;&#039;allow&#039;&#039;&lt;br /&gt;
#*[[Capabilities/moodle/user:readuserblogs|moodle/user:readuserblogs]] - to read the child&#039;s blog entries&lt;br /&gt;
#*[[Capabilities/moodle/user:readuserposts|moodle/user:readuserposts]] - to read the child&#039;s forum posts&lt;br /&gt;
#*[[Capabilities/moodle/user:viewuseractivitiesreport|moodle/user:viewuseractivitiesreport]] - to view the child&#039;s activity reports and grades&lt;br /&gt;
#*[[Capabilities/moodle/user:editprofile|moodle/user:editprofile]] - to edit the child&#039;s profile&lt;br /&gt;
#Click the button &amp;quot;Add a new role&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Role assignment==&lt;br /&gt;
&lt;br /&gt;
#Access the child&#039;s profile page and click on the Roles tab i.e. assign the role in the user context&lt;br /&gt;
#Choose the role to assign i.e. Parent&lt;br /&gt;
#Select the parent in the potential users list, and use the left-facing arrow button to add it to the existing users list&lt;br /&gt;
The same parent may be assigned to several children.&lt;br /&gt;
===Adding multiple role assignments at once===&lt;br /&gt;
(if you are interested in assigning several parent roles &#039;&#039;en masse&#039;&#039; read the discussion at http://moodle.org/mod/forum/discuss.php?d=70539#p345127)&lt;br /&gt;
&lt;br /&gt;
==Mentees block==&lt;br /&gt;
{{Moodle 1.8}}&lt;br /&gt;
The [[Mentees block]] provides a parent with quick access to their child&#039;s profile page via a link on the site front page.&lt;br /&gt;
#On the site front page click &amp;quot;Turn editing on&amp;quot;&lt;br /&gt;
#Choose Mentees from the Add a block drop-down menu&lt;br /&gt;
#If required, give the Mentees block a title by following the block configuration/edit link&lt;br /&gt;
&lt;br /&gt;
==Viewing activity reports==&lt;br /&gt;
&lt;br /&gt;
If the capability [[Capabilities/moodle/user:viewuseractivitiesreport|moodle/user:viewuseractivitiesreport]] is set to &#039;&#039;allow&#039;&#039; then a parent may view their child&#039;s activity reports and grades. To access the activity reports and grades for each of their child&#039;s courses, the parent should follow each of the course links on their child&#039;s profile page.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Manage roles]] - including testing a new role&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=57812 Create a Parent of a student role] forum discussion &lt;br /&gt;
*[http://www.youtube.com/watch?v=-49YrtjMTTo Setting up a Parent Role video]&lt;br /&gt;
*[http://www.youtube.com/watch?v=P23GT2peLZI Parent Signing in on Moodle video]&lt;br /&gt;
&lt;br /&gt;
[[Category:Roles]]&lt;br /&gt;
&lt;br /&gt;
[[eu:Guraso_rola]]&lt;br /&gt;
[[fr:Rôle Parent]]&lt;br /&gt;
[[ja:親ロール]]&lt;br /&gt;
[[de:Eltern-Rolle]]&lt;br /&gt;
[[nl:Ouder Rol]]&lt;/div&gt;</summary>
		<author><name>Matthewm1970</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Cron&amp;diff=77441</id>
		<title>Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Cron&amp;diff=77441"/>
		<updated>2010-11-02T20:34:52Z</updated>

		<summary type="html">&lt;p&gt;Matthewm1970: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cron is the name of a Unix program that runs predefined tasks on a computer at regular intervals. It assists some of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the cron process might tell Moodle to check all discussion forums so it can mail out copies of new posts to people who have subscribed to that forum. &lt;br /&gt;
&lt;br /&gt;
The primary Moodle script that does all this is located in the admin directory, and is called cron.php. However, it can not tell itself to run, so you need to set up a mechanism where this script is run regularly (eg every five or ten minutes). This provides a &amp;quot;heartbeat&amp;quot; so that the script can perform functions at periods defined by each module. This kind of regular mechanism is known as a &#039;&#039;&#039;cron service&#039;&#039;&#039;. The service can be part of a webhost or can be something run from a different server or computer.&lt;br /&gt;
&lt;br /&gt;
==Overview of cron==&lt;br /&gt;
===Script overview===&lt;br /&gt;
&lt;br /&gt;
The cron.php script looks through the mdl_modules table (assuming the default table prefix is mdl_) in the Moodle database for modules scheduled to have their cron functions run; it then looks in each such module directory for a function called module-name_cron in the lib.php file and runs it.  It also looks through the mdl_block table for blocks scheduled for their cron methods (object functions) to be run; it then, for each such block, runs the cron method for a new object associated with that block (I&#039;m omitting details for the benefit of non-programmers; programmers can read admin/cron.php for themselves). These files (the lib.php files and the files where the block classes are defined) can contain cleanup functions, email functions or anything that needs to be run on a regular basis. For example, cron will trigger the system to create the backups of courses at the time specified in the administration settings. It also triggers any messaging module or forum email notifications, but not all functions are called each time the cron runs. Some functions, such as unenrolling students who have not logged in or deleting old copies of log files, are only run occasionally. The cron.php file has a section which will randomly call these core tasks approximately 1 in 5 times the cron runs.&lt;br /&gt;
&lt;br /&gt;
===Starting cron===&lt;br /&gt;
In Moodle 1.9 there are a number of way to invoke cron.php. Cron can be started from the address bar in a browser (URL usually ending in admin/cron.php), via a [[Daemon]], or wq1et, curl or some other code.&lt;br /&gt;
&lt;br /&gt;
The cron process can be protected by a password. &lt;br /&gt;
&lt;br /&gt;
The cronclionly Security&amp;gt; Site Policies setting with stop the broswer URL trigger.  This sets Moodle so that cron.php cannot be invoked by the Moodle URL. See the illustration below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Menu: Security &amp;gt; Site policies&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodelcronadmin.png]]&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; While this is identified as CLI (command line interface) this is a bit misleading in that it does not mean that you have to be sitting at a shell account entering the command. If you enable this switch you can invoke cron.php through any set of batch or script files you wish,  but it must be invoked via its correct location in the operating systems file structure.  This can be especially frustrating for those not used to scripting in that environment is not typically provided.&lt;br /&gt;
&lt;br /&gt;
===Cron service location and timing===&lt;br /&gt;
Note that the machine performing the cron &#039;&#039;&#039;does not need to be the same machine that is running Moodle&#039;&#039;&#039;. For example, if you have a limited web hosting service that does not have a cron service, then you might choose to run cron on another server or on your home computer. All that matters is that the cron.php file is called regularly.&lt;br /&gt;
&lt;br /&gt;
The load of this script is not very high, so 5 minutes is usually reasonable, but if you&#039;re worried about it you can reduce the time period to something like 15 minutes or even 30 minutes. It&#039;s best not to make the time period too long, as delaying mail-outs can slow down activity within the course. Remember that mail-outs also wait for the editing time to expire before being queued for sending.&lt;br /&gt;
&lt;br /&gt;
===Testing cron and manual trigger===&lt;br /&gt;
&lt;br /&gt;
First, test that the script works by running it directly from your browser: &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If cron is called from the command line by any user logged in to your Moodle it will create a temporary admin environment in order to run and then log the user out. You can disable command line running of cron by disabling the appropriate section in the cron.php file.&lt;br /&gt;
&lt;br /&gt;
Now, you need to set up some of way of running the script automatically and regularly.&lt;br /&gt;
&lt;br /&gt;
==Managing Cron on Windows systems==&lt;br /&gt;
&lt;br /&gt;
There are two different ways for setting-up Moodle cron.php on Windows systems:&lt;br /&gt;
&lt;br /&gt;
*Use the &#039;&#039;&#039;Moodle Cron package&#039;&#039;&#039;. The simplest way is to use this little package [http://download.moodle.org/download.php/windows/MoodleCron-Setup.exe MoodleCron-Setup.exe], which makes this whole thing very easy by installing a small Windows service. Run it and forget about it! :-)&lt;br /&gt;
*Use a &#039;&#039;&#039;Scheduled Task&#039;&#039;&#039;. If you prefer to use the built-in Windows Scheduler or are having trouble with moodle-cron-for-windows package, you can use wget for windows or php from the command line and setup a scheduled task. Just follow these steps:&lt;br /&gt;
** Choose either the &#039;&#039;&#039;php.exe/php-win.exe (command line binary)&#039;&#039;&#039; or &#039;&#039;&#039;wget&#039;&#039;&#039;&lt;br /&gt;
::The php.exe or php-win.exe binary (for PHP version 5 or later) is installed in your php folder (e.g. c:\php) will give you better performance when running the cron script.&lt;br /&gt;
::If you want to use wget, download a compiled version of wget for windows from the native GNU Win32 ports (http://unxutils.sourceforge.net/), from Heiko Herold&#039;s wget for windows page (http://xoomer.virgilio.it/hherold/) or Bart Puype&#039;s wget for windows page (http://users.ugent.be/~bpuype/wget/). If you use Heiko Herold&#039;s package, copy all of the .DLL files to your C:\Windows\system32 directory. Copy the wget.exe file to c:\windows (this makes sure wget is always in the search path).&lt;br /&gt;
:* Setup a &#039;&#039;&#039;Scheduled Task&#039;&#039;&#039;. &lt;br /&gt;
:: - Go to Start &amp;gt;&amp;gt; Control Panel &amp;gt;&amp;gt; Scheduled Tasks &amp;gt;&amp;gt; Add Scheduled Task.&lt;br /&gt;
:: - Click &amp;quot;Next&amp;quot; to start the wizard:&lt;br /&gt;
:: - Click in the &amp;quot;Browse...&amp;quot; button and browse to c:\php\php.exe or c:\windows\wget.exe and click &amp;quot;Open&amp;quot;&lt;br /&gt;
:: - Type &amp;quot;Moodle Cron&amp;quot; as the name of the task and select &amp;quot;Daily&amp;quot; as the schedule. Click &amp;quot;Next&amp;quot;.&lt;br /&gt;
:: - Select &amp;quot;12:00 AM&amp;quot; as the start time, perform the task &amp;quot;Every Day&amp;quot; and choose today&#039;s date as the starting date. Click &amp;quot;Next&amp;quot;.&lt;br /&gt;
:: - Enter the username and password of the user the task will run under (it doesn&#039;t have to be a priviledged account at all). Make sure you type the password correctly. Click &amp;quot;Next&amp;quot;.&lt;br /&gt;
:: - Mark the checkbox titled &amp;quot;Open advanced properties for this task when I click Finish&amp;quot; and click &amp;quot;Finish&amp;quot;.&lt;br /&gt;
:: - In the new dialog box, type the following in the &amp;quot;Run:&amp;quot; text box: &amp;lt;pre&amp;gt;c:\windows\wget.exe -q -O NUL http://my.moodle.site/moodle/admin/cron.php&amp;lt;/pre&amp;gt; or &amp;lt;pre&amp;gt;c:\php\php-win.exe -f c:\moodle\admin\cron.php&amp;lt;/pre&amp;gt; Replace &amp;quot;c:\moodle&amp;quot; with the path to your moodle directory or &amp;quot;my.moode.site&amp;quot; with the name of your site.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:: - Click on the &amp;quot;Schedule&amp;quot; tab and there in the &amp;quot;Advanced...&amp;quot; button.&lt;br /&gt;
:: - Mark the &amp;quot;Repeat task&amp;quot; checkbox and set &amp;quot;Every:&amp;quot; to 5 minutes, and set &amp;quot;Until:&amp;quot; to &amp;quot;Duration&amp;quot; and type &amp;quot;23&amp;quot; hours and &amp;quot;59&amp;quot; minutes.&lt;br /&gt;
:: - Click &amp;quot;OK&amp;quot; and you are done.&lt;br /&gt;
* &#039;&#039;&#039;Test your scheduled task&#039;&#039;&#039;. You can test that your scheduled task can run successfully by clicking it with the right button and chosing &amp;quot;Run&amp;quot;. If everything is correctly setup, you will briefly see a DOS command window while wget/php executes and fetches the cron page and then it disappears. If you refresh the scheduled tasks folder, you will see the &#039;&#039;Last Run Time column&#039;&#039; (in detailed folder view) reflects the current time, and that the Last Result column displays &amp;quot;0x0&amp;quot; (everything went OK). If either of these is different, then you should recheck your setup.&lt;br /&gt;
* &#039;&#039;&#039;Logging cron output&#039;&#039;&#039;. You may want to log the output of the cron script as it executes, in case you see the job is producing errors, backups are not being completed or users are experiencing delays in receiving forum emails. To do this, adjust the command so that it uses the php.exe and stores the output in a file called (for example c:\moodle\admin\cron.log). Here is an example of the php.exe command:&lt;br /&gt;
&amp;lt;pre&amp;gt;c:\php\php.exe -f c:\moodle\admin\cron.php &amp;gt; c:\moodle\admin\cron.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you experience problems logging the output of cron.php to a text file using the above command then read [http://moodle.org/mod/forum/discuss.php?d=139263#p609060 this] message by Iñaki Arenaza for an alternative way to log the output of Cron.&lt;br /&gt;
&lt;br /&gt;
==Managing the cron job on Mac OS X with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X 10.5 you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more informations about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;.   If you use a site with SSL (ie: it has an http&#039;&#039;&#039;s&#039;&#039;&#039;:// protocol) you either need to have your SSL certificates listed for use by the CURL utility ([http://curl.haxx.se/docs/sslcerts.html see these docs] for more details) OR you must use the &#039;-k&#039; switch in addition to the &#039;-s&#039; switch used above; your arguments line would then read: `&amp;lt;string&amp;gt;-s -k&amp;lt;/string&amp;gt;`.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; I will get a cron service for both.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==Managing cron on web hosting services==&lt;br /&gt;
&lt;br /&gt;
Your web-based control panel may have a web page that allows you to set up a cron service process. &lt;br /&gt;
&lt;br /&gt;
===CPanel cron service===&lt;br /&gt;
If you are using CPanel, login then look for &amp;quot;Advanced&amp;quot; category towards the bottom of the page. Click on Cron Jobs -&amp;gt; Advanced (Unix style). Enter the following for the cron to run every 30 minutes.&lt;br /&gt;
&lt;br /&gt;
 Email address for output: emailaddress@mydomain.con&lt;br /&gt;
 Minute:*/30&lt;br /&gt;
 Hour:*&lt;br /&gt;
 Day:*&lt;br /&gt;
 Month:*&lt;br /&gt;
 Weekday:* &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Command: wget -q -O /dev/null http://www.mydomain.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click Commit Changes. Check your email for the output. &lt;br /&gt;
&lt;br /&gt;
[[Image:Cpanel-cron-setup.JPG]]&lt;br /&gt;
&lt;br /&gt;
===Other systems cron service===&lt;br /&gt;
For other systems, look for a button called &amp;quot;Cron jobs&amp;quot;. In there you can put the same sort of Unix commands as listed below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have permissions to run the &#039;wget&#039; command on the server, you can use this php command:&lt;br /&gt;
&lt;br /&gt;
 /usr/local/bin/php -q /real/path/to/script/admin/cron.php&lt;br /&gt;
&lt;br /&gt;
For example: &lt;br /&gt;
&lt;br /&gt;
 /usr/local/bin/php -q /home/username/public_html/moodle/admin/cron.php&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t know what is the real path of your Moodle folder you can use the PHP command realpath.&lt;br /&gt;
&lt;br /&gt;
Another alternative, if you do not have permission to run the &#039;wget&#039; command, may be to use a curl command.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
curl --silent --compressed http://mydomain.com/moodle/admin/cron.php&lt;br /&gt;
&lt;br /&gt;
==Using a cron command line in Unix==&lt;br /&gt;
&lt;br /&gt;
There are different command line programs you can use to call the page from the command line. Not all of them may be available on a given server.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The examples with wget, lynx, and similar are &#039;&#039;&#039;not&#039;&#039;&#039; the same as the &amp;quot;CLI only&amp;quot; cron checkbox, mentioned above (the configuration variable &amp;quot;cronclionly&amp;quot;). wget, lynx, and other similar utilities are Unix command-line HTTP clients, and thus running cron.php in this way is the same as running it in a browser, from Moodle&#039;s point of view.&lt;br /&gt;
&lt;br /&gt;
For example, you can use a Unix utility like &#039;wget&#039;:&lt;br /&gt;
&lt;br /&gt;
 wget -q -O /dev/null &amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note in this example that the output is thrown away (to /dev/null).&lt;br /&gt;
&lt;br /&gt;
A number of users of Moodle have found that &#039;wget&#039; sometimes fails. Especially if you have trouble with email digests not being sent on a daily basis to all users, an alternative command that solves the problem is:&lt;br /&gt;
&lt;br /&gt;
 php &amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same thing using lynx:&lt;br /&gt;
&lt;br /&gt;
 lynx -dump &amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt; &amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
Note in this example that the output is thrown away (to /dev/null).&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use a standalone version of PHP, compiled to be run on the command line. The disadvantage is that you need to have access to a command-line version of php. The advantage is that your web server logs aren&#039;t filled with constant requests to cron.php and you can run at a lower I/O and CPU priority.&lt;br /&gt;
&lt;br /&gt;
 /opt/bin/php /web/moodle/admin/cron.php&lt;br /&gt;
&lt;br /&gt;
Example command to run at lower priority:&lt;br /&gt;
&lt;br /&gt;
  ionice -c3 -p$$;nice -n 10 /usr/bin/php /moodle/admin/cron.php &amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
===Using the crontab program on Unix===&lt;br /&gt;
&lt;br /&gt;
All that Cpanel does is provide a web interface to a Unix utility known as crontab. If you have a command line, you can set up crontab yourself using the command:&lt;br /&gt;
&lt;br /&gt;
 crontab -e&lt;br /&gt;
&lt;br /&gt;
and then adding one of the above commands like:&lt;br /&gt;
&lt;br /&gt;
 */30 * * * * wget -q -O /dev/null &amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first five entries are the times to run values, followed by the command to run. The asterisk is a wildcard, indicating any time. The above example means run the command &#039;&#039;wget -q -O /dev/null...&#039;&#039; every 30 minutes (*/30), every hour (*), every day of the month (*), every month (*), every day of the week (*). &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;O&amp;quot; of &amp;quot;-O&amp;quot; is the capital letter not zero, and refers the output file destination, in this case &amp;quot;/dev/null&amp;quot; which is a black hole and discards the output. If you want to see the output of your cron.php then enter its url in your browser. &lt;br /&gt;
&lt;br /&gt;
* [http://linuxweblog.com/node/24 A basic crontab tutorial] &lt;br /&gt;
* [http://www.freebsd.org/cgi/man.cgi?query=crontab&amp;amp;apropos=0&amp;amp;sektion=5&amp;amp;manpath=FreeBSD+6.0-RELEASE+and+Ports&amp;amp;format=html Online version of the man page] &lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;beginners&#039;&#039;&#039;, &amp;quot;EDITOR=nano crontab -e&amp;quot; will allow you to edit the crontab using the [http://www.nano-editor.org/dist/v1.2/faq.html nano] editor. Ubuntu defaults to using the nano editor.&lt;br /&gt;
&lt;br /&gt;
Usually, the &amp;quot;crontab -e&amp;quot; command will put you into the &#039;vi&#039; editor. You enter &amp;quot;insert mode&amp;quot; by pressing &amp;quot;i&amp;quot;, then type in the line as above, then exit insert mode by pressing ESC. You save and exit by typing &amp;quot;:wq&amp;quot;, or quit without saving using &amp;quot;:q!&amp;quot; (without the quotes). Here is an [http://www.unix-manuals.com/tutorials/vi/vi-in-10-1.html intro] to the &#039;vi&#039; editor.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=41827 Cron - can someone give me a quick confirmation of function?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97684 Cronjob Question]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97457 Slow cron : avoiding simultaneous cron]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=117168 Visibility of cron.php]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=139263#p609060 How to log the output of a Scheduled Task on Windows] - this discussion explains a nice trick that can be very useful when you are experiencing problems with your Windows Scheduled Task and you need to log the output of the Scheduled Task to a log file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:Cron]]&lt;br /&gt;
[[fr:Cron]]&lt;br /&gt;
[[nl:Cron]]&lt;br /&gt;
[[sk:Cron]]&lt;br /&gt;
[[pl:Cron]]&lt;br /&gt;
[[ja:Cron]]&lt;/div&gt;</summary>
		<author><name>Matthewm1970</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=LDAP_authentication&amp;diff=74479</id>
		<title>LDAP authentication</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=LDAP_authentication&amp;diff=74479"/>
		<updated>2010-08-04T17:55:09Z</updated>

		<summary type="html">&lt;p&gt;Matthewm1970: /* User lookup settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.9}}&lt;br /&gt;
Location: Settings link in &#039;&#039;Administration &amp;gt; Users &amp;gt; [[Authentication]] &amp;gt; LDAP Server&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This document describes how to set up Lightweight Directory Access Protocol (LDAP) authentication in Moodle.  We cover the basic, advanced and some trouble shooting sections to assist the user in the installation and administrating LDAP in Moodle.  &lt;br /&gt;
==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
==Basic Scenario==&lt;br /&gt;
The simple and straightforward approach  for most installations.&lt;br /&gt;
&lt;br /&gt;
===Assumptions===&lt;br /&gt;
&lt;br /&gt;
# Your Moodle site is located at &#039;&#039;&#039;http://your.moodle.site/&#039;&#039;&#039;&lt;br /&gt;
# You have configured your PHP installation with the LDAP extension. It is loaded and activated, and it shows when you go to &#039;&#039;&#039;http://your.moodle.site/admin/phpinfo.php&#039;&#039;&#039; (logged in as user &#039;admin&#039;).&lt;br /&gt;
# Your LDAP server has &#039;&#039;&#039;192.168.1.100&#039;&#039;&#039; as its IP address.&lt;br /&gt;
# You are not using LDAP with SSL (also known as LDAPS) in your settings. This might prevent certain operations from working (e.g., you cannot update data if you are using MS Active Directory -- MS-AD from here on --), but should be OK if you just want to authenticate your users.&lt;br /&gt;
# You don&#039;t want your users to change their passwords the first time they log in into Moodle.&lt;br /&gt;
# You are using a single domain as the source of your authentication data in case you are using MS-AD (more on this in the Appendices).&lt;br /&gt;
# You are using a top level distinguished name (DN) of &#039;&#039;&#039;dc=my,dc=organization,dc=domain&#039;&#039;&#039; as the root of your LDAP tree. &lt;br /&gt;
# You have a non-privileged LDAP user account you will use to bind to the LDAP server. This is not necessary with certain LDAP servers, but MS-AD requires this and it won&#039;t hurt if you use it even if your LDAP server doesn&#039;t need it. Make sure &#039;&#039;&#039;this account and its password don&#039;t expire&#039;&#039;&#039;, and make this password as strong as possible. Remember you only need to type this password once, when configuring Moodle, so don&#039;t be afraid of making it as hard to guess as possible. Let&#039;s say this user account has a DN of &#039;&#039;&#039;cn=ldap-user,dc=my,dc=organization,dc=domain&#039;&#039;&#039;, and password &#039;&#039;&#039;hardtoguesspassword&#039;&#039;&#039;.&lt;br /&gt;
# All of your Moodle users are in an organizational unit (OU) called &#039;&#039;&#039;moodleusers&#039;&#039;&#039;, which is right under your LDAP root. That OU has a DN of &#039;&#039;&#039;ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039;.&lt;br /&gt;
# You &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want your LDAP users&#039; passwords to be stored in Moodle at all.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
===Configuring Moodle authentication===&lt;br /&gt;
&lt;br /&gt;
Log in as an admin user and go to Administration &amp;gt;&amp;gt; Users &amp;gt;&amp;gt; Authentication &amp;gt;&amp;gt; Manage authentication. In the table that appears, enable the &amp;quot;LDAP Server&amp;quot; authentication option (click on the closed eye to make it open) and then click on the associated &#039;Settings&#039; link. You will get a page similar to this one:&lt;br /&gt;
&lt;br /&gt;
[[Image:auth_ldap_config_screenshot.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Now, you just have to fill in the values. Let&#039;s go step by step.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====LDAP Server Settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Host URL&lt;br /&gt;
| As the IP of your LDAP server is 192.168.1.100, type &amp;quot;&#039;&#039;&#039;ldap://192.168.1.100&#039;&#039;&#039;&amp;quot; (without the quotes), or just &amp;quot;&#039;&#039;&#039;192.168.1.100&#039;&#039;&#039;&amp;quot; (some people have trouble connecting with the first syntax, specially on MS Windows servers).&lt;br /&gt;
|-&lt;br /&gt;
| Version&lt;br /&gt;
| Unless you are using a really old LDAP server, &#039;&#039;&#039;version 3&#039;&#039;&#039; is the one you should choose.&lt;br /&gt;
|-&lt;br /&gt;
| LDAP Encoding&lt;br /&gt;
| Specify encoding used by LDAP server. Most probably utf-8.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Bind settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Hide passwords&lt;br /&gt;
| As you &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want to store the users&#039;s password in Moodle&#039;s database, choose &#039;&#039;&#039;Yes&#039;&#039;&#039; here.&lt;br /&gt;
|-&lt;br /&gt;
| Distinguished Name&lt;br /&gt;
| This is the distinguished name of the bind user defined above. Just type &amp;quot;&#039;&#039;&#039;cn=ldap-user,dc=my,dc=organization,dc=domain&#039;&#039;&#039;&amp;quot; (without the quotes).&lt;br /&gt;
|-&lt;br /&gt;
| Password&lt;br /&gt;
| This is the bind user password defined above. Type &amp;quot;&#039;&#039;&#039;hardtoguesspassword&#039;&#039;&#039;&amp;quot; (without the quotes).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====User lookup settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| User type&lt;br /&gt;
| Choose: &lt;br /&gt;
* &#039;&#039;&#039;Novel Edirectory&#039;&#039;&#039; if your LDAP server is running Novell&#039;s eDdirectory.&lt;br /&gt;
* &#039;&#039;&#039;posixAccount (rfc2307)&#039;&#039;&#039; if your LDAP server is running a RFC-2307 compatible LDAP server (choose this is your server is running OpenLDAP, including Mac OS X server).&lt;br /&gt;
* &#039;&#039;&#039;posixAccount (rfc2307bis)&#039;&#039;&#039; if your LDAP server is running a RFC-2307bis compatible LDAP server.&lt;br /&gt;
* &#039;&#039;&#039;sambaSamAccount (v.3.0.7)&#039;&#039;&#039; if your LDAP server is running with SAMBA&#039;s 3.x LDAP schema extension and you want to use it.&lt;br /&gt;
* &#039;&#039;&#039;MS ActiveDirectory&#039;&#039;&#039; if your LDAP server is running Microsoft&#039;s Active Directory (MS-AD)&lt;br /&gt;
|-&lt;br /&gt;
| Contexts&lt;br /&gt;
| The DN of the context (container) where all of your Moodle users are found. Type &#039;&#039;&#039;ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039; here.  &lt;br /&gt;
&lt;br /&gt;
On a Mac OS X Server, this is usually &#039;&#039;&#039;cn=users,dc=my,dc=organization,dc=domain&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Search subcontexts&lt;br /&gt;
| If you have any sub organizational units (subcontexts) hanging from &#039;&#039;&#039;ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039; and you want Moodle to search there too, set this to &#039;&#039;&#039;yes&#039;&#039;&#039;. Otherwise, set this to &#039;&#039;&#039;no&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Dereference aliases&lt;br /&gt;
| Sometimes your LDAP server will tell you that the real value you are searching for is in fact in another part of the LDAP tree (this is called an alias). If you want Moodle to &#039;dereference&#039; the alias and fetch the real value from the original location, set this to &#039;&#039;&#039;yes&#039;&#039;&#039;. If you don&#039;t want Moodle to dereference it, set this to &#039;&#039;&#039;no&#039;&#039;&#039;. If you are using MS-AD, set this to &#039;&#039;&#039;no&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| User attribute&lt;br /&gt;
| The attribute used to name/search users in your LDAP tree. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you chose above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By the way, it&#039;s usually &#039;&#039;&#039;cn&#039;&#039;&#039; (Novell eDirectory and MS-AD) or &#039;&#039;&#039;uid&#039;&#039;&#039; (RFC-2037, RFC-2037bis and SAMBA 3.x LDAP extension), but if you are using MS-AD you could use &#039;&#039;&#039;sAMAccountName&#039;&#039;&#039; (the pre-Windows 2000 logon account name) if you need too.&lt;br /&gt;
|-&lt;br /&gt;
| Member attribute&lt;br /&gt;
| The attribute used to list the members of a given group. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By the way, the usual values are &#039;&#039;&#039;member&#039;&#039;&#039; and &#039;&#039;&#039;memberUid&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Member attribute uses dn&lt;br /&gt;
| Whether the member attribute contains distinguished names (1) or not (0).This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Object class&lt;br /&gt;
| The type of LDAP object used to search for users. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you chose above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
* If you leave it blank, the filter &amp;quot;(objectClass=*)&amp;quot; will be used.&lt;br /&gt;
* If you provide &amp;quot;objectClass=some-string&amp;quot;, then it will provide &amp;quot;(objectClass=some-string)&amp;quot; as the filter.&lt;br /&gt;
* If you provide a value that does not start with &amp;quot;(&amp;quot;, it is assumed to be a value that should be set to &amp;quot;objectClass&amp;quot;. So if you provide &amp;quot;some-string&amp;quot;, then it will provide &amp;quot;(objectClass=some-string)&amp;quot; as the filter.&lt;br /&gt;
* If you provide a string that starts with a &amp;quot;(&amp;quot;, then it will pass that as is. So if you provide &amp;quot;(&amp;amp;(objectClass=user)(enabledMoodleUser=1))&amp;quot;, then it will pass that as the filter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the default values for each of the &#039;&#039;ldap_user_type&#039;&#039; values:&lt;br /&gt;
* &#039;&#039;&#039;User&#039;&#039;&#039; for Novel eDirectory&lt;br /&gt;
* &#039;&#039;&#039;posixAccount&#039;&#039;&#039; for RFC-2037 and RFC-2037bis&lt;br /&gt;
* &#039;&#039;&#039;sambaSamAccount&#039;&#039;&#039; for SAMBA 3.0.x LDAP extension&lt;br /&gt;
* &#039;&#039;&#039;user&#039;&#039;&#039; for MS-AD&lt;br /&gt;
If you get an error about a problem with updating the ldap server (even if you have specified not to write changes back to the ldap server) try setting the ldap object class to * - see http://moodle.org/mod/forum/discuss.php?d=70566 for a discussion on this problem&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Force change password====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Force change password&lt;br /&gt;
| Set this to &#039;&#039;Yes&#039;&#039; if you want to force your users to change their password on the first login into Moodle. Otherwise, set this to &#039;&#039;no&#039;&#039;. Bear in mind the password they are forced to change is the one stored in your LDAP server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;As you don&#039;t want your users to change their passwords in their first login, leave this set to &#039;&#039;No&#039;&#039;&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Use standard Change Password Page&lt;br /&gt;
|&lt;br /&gt;
* Setting this to &#039;&#039;Yes&#039;&#039; makes Moodle use it&#039;s own standard password change page, everytime users want to change their passwords.&lt;br /&gt;
* Setting this to &#039;&#039;No&#039;&#039; makes Moodle use the the page specified in the field called &amp;quot;Password change URL&amp;quot; (see below).&lt;br /&gt;
&lt;br /&gt;
Bear in mind that changing your LDAP passwords from Moodle might require a LDAPS connection (this is actually a requirement for MS-AD). In addition to that, the bind user specified above must have the rights needed to change other users&#039; passwords.&lt;br /&gt;
&lt;br /&gt;
Also, code for changing passwords from Moodle for anything but Novell eDirectory and Active Directory is almost not tested, so this may or may not work for other LDAP servers.&lt;br /&gt;
|-&lt;br /&gt;
| Password Format&lt;br /&gt;
| Specify how the new password is encrypted before sending it to the LDAP server: Plain text, MD5 hash or SHA-1 hash. MS-AD uses plain text, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Password change URL&lt;br /&gt;
| Here you can specify a location at which your users can recover or change their username/password if they&#039;ve forgotten it. This will be provided to users as a button on the login page and their user page. if you leave this blank the button will not be printed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====LDAP password expiration settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Expiration&lt;br /&gt;
| &lt;br /&gt;
* Setting this to &#039;&#039;No&#039;&#039; will make Moodle not to check if the password of the user has expired or not.&lt;br /&gt;
* Setting this to &#039;&#039;LDAP&#039;&#039; will make Moodle check if the LDAP password of the user has expired or not, and warn her a number of days before the password expires.&lt;br /&gt;
&lt;br /&gt;
Current code only deals with Novell eDirectory LDAP server and MS-AD.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;So unless you have Novell eDirectory server or MS-AD, choose &#039;&#039;No&#039;&#039; here.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Expiration warning&lt;br /&gt;
| This value sets how many days in advance of password expiration the user is warned that her password is about to expire.&lt;br /&gt;
|-&lt;br /&gt;
| Expiration attribute.&lt;br /&gt;
| The LDAP user attribute used to check password expiration. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Grace logins&lt;br /&gt;
| This setting is specific to Novell eDirectory. If set to &#039;&#039;Yes&#039;&#039;, enable LDAP gracelogin support. After password has expired the user can login until gracelogin count is 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;So unless you have Novell eDirectory server and want to allow gracelogin support, choose &#039;&#039;No&#039;&#039; here.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Grace login attribute&lt;br /&gt;
| This setting is currently not used in the code (and is specific to Novell eDirectory). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;So you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Enable user creation====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Create users externally&lt;br /&gt;
| New (anonymous) users can self-create user accounts on the external LDAP server and confirm them via email. If you enable this, remember to also configure module-specific options for user creation and to fill in some instructions in &#039;&#039;auth_instructions&#039;&#039; field in Administration &amp;gt;&amp;gt; Users &amp;gt;&amp;gt; Authentication &amp;gt;&amp;gt; Manage authentication. Otherwise the new users won&#039;t be able to self-create new accounts.&lt;br /&gt;
&lt;br /&gt;
As of now, only Novell eDirectory and MS-AD can create users externally.&lt;br /&gt;
|-&lt;br /&gt;
| Context for new users&lt;br /&gt;
| Specify the context where users are created. This context should be different from other users&#039; contexts to prevent security issues. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Course creation====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Creators&lt;br /&gt;
| The DN of the group that contains all of your Moodle creators. This is typically a posixGroup with a &amp;quot;memberUid&amp;quot; attribute for each user you want to be a creator.  If your group is called &#039;&#039;creators&#039;&#039;, type &#039;&#039;&#039;cn=creators,ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039; here.  Each memberUid attribute contains the CN of a user who is authorized to be a creator.  Do not use the user&#039;s full DN (e.g.,  not &#039;&#039;&#039;memberUid: cn=JoeTeacher,ou=moodleusers,dc-my,dc=organizations,dc=domain&#039;&#039;&#039;, but rather &#039;&#039;&#039;memberUid: JoeTeacher&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In eDirectory, the objectClass for a group is (by default) not &#039;&#039;&#039;posixGroup&#039;&#039;&#039; but &#039;&#039;&#039;groupOfNames,&#039;&#039;&#039; whose member attribute is &#039;&#039;&#039;member,&#039;&#039;&#039; not &#039;&#039;&#039;memberUid,&#039;&#039;&#039; and whose value is the full DN of the user in question.  Although you can probably modify Moodle&#039;s code to use this field, a better solution is just to add a new &#039;&#039;&#039;objectClass&#039;&#039;&#039; attribute of &#039;&#039;&#039;posixGroup&#039;&#039;&#039; to your creators group and put the CNs for each creator in a &#039;&#039;&#039;memberUid&#039;&#039;&#039; attribute.&lt;br /&gt;
&lt;br /&gt;
In MS Active Directory, you will need to create a security group for your creators to be part of and then add them all. If your ldap context above is &#039;ou=staff,dc=my,dc=org&#039; then your group should then be &#039;cn=creators,ou=staff,dc=my,dc=org&#039;. If some of the users are from other contexts and have been added to the same security group, you&#039;ll have to add these as separate contexts after the first one using the same format.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Cron synchronization script====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Removed ext user&lt;br /&gt;
| Specify what to do with internal user account during mass synchronization when user was removed from external source. Only suspended users are automatically revived if they reappear in ext source.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====NTLM SSO====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Enable&lt;br /&gt;
| If you want to use NTLM SSO (see details at [[NTLM_authentication]]), choose &#039;&#039;Yes&#039;&#039; here. Otherwise, choose &#039;&#039;No&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Subnet&lt;br /&gt;
| Specify the subnets of the clients that will use NTLM SSO (see details at [[NTLM_authentication]]).&lt;br /&gt;
|-&lt;br /&gt;
| MS IE Fast Path?&lt;br /&gt;
| If all of you clients (or most of them) are using MS Internet Explorer, you can set this option to bypasses certain steps of the SSO login and speed up login times. This only works with MS Internet Explorer, but deals with other browsers in a sensible way (they are automatically sent to the plain login page).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Data Mapping====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| First name&lt;br /&gt;
| The name of the attribute that holds the first name of your users in your LDAP server. This is usually &#039;&#039;&#039;givenName&#039;&#039;&#039; or &#039;&#039;&#039;displayName&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Surname&lt;br /&gt;
| The name of the attribute that holds the surname of your users in your LDAP server. This is usually &#039;&#039;&#039;sn&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Email address&lt;br /&gt;
| The name of the attribute that holds the email address of your users in your LDAP server. This is usually &#039;&#039;&#039;mail&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| City/town&lt;br /&gt;
| The name of the attribute that holds the city/town of your users in your LDAP server. This is usully &#039;&#039;&#039;l&#039;&#039;&#039; (lowercase L) or &#039;&#039;&#039;localityName&#039;&#039;&#039; (not valid in MS-AD).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Country&lt;br /&gt;
| The name of the attribute that holds the country of your users in your LDAP server. This is usully &#039;&#039;&#039;c&#039;&#039;&#039; or &#039;&#039;&#039;countryName&#039;&#039;&#039; (not valid in MS-AD).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Language&lt;br /&gt;
| &#039;&#039;&#039;preferredLanguage&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Description&lt;br /&gt;
| &#039;&#039;&#039;description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Webpage&lt;br /&gt;
| &amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ID Number&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Institution&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Department&lt;br /&gt;
| The name of the attribute that holds the department name of your users in your LDAP server. This is usully &#039;&#039;&#039;departmentNumber&#039;&#039;&#039; (for posixAccount and maybe eDirectory) or &#039;&#039;&#039;department&#039;&#039;&#039; (for MS-AD).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Phone 1&lt;br /&gt;
| The name of the attribute that holds the telephone number of your users in your LDAP server. This is usually &#039;&#039;&#039;telephoneNumber&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Phone 2&lt;br /&gt;
|  The name of the attribute that holds an additional telephone number of your users in your LDAP server. This can be &#039;&#039;&#039;homePhone&#039;&#039;&#039;, &#039;&#039;&#039;mobile&#039;&#039;&#039;, &#039;&#039;&#039;pager&#039;&#039;&#039;, &#039;&#039;&#039;facsimileTelephoneNumber&#039;&#039;&#039; or even others.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Address&lt;br /&gt;
| The name of the attribute that holds the street address of your users in your LDAP server. This is usully &#039;&#039;&#039;streetAddress&#039;&#039;&#039; or &#039;&#039;&#039;street&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
===Setting up regular automatic synchronisation using cron===&lt;br /&gt;
There is a script located at /auth/ldap/auth_ldap_sync_users.php which will create or suspend/delete (see the setting above) all LDAP accounts automatically. Ideally, this is called from the command line once a day during a quiet time using exactly the same procedure as the standard [[Cron|cron]] job (so you will end up with two cron entries). It is important, however, to make sure that all of the above LDAP settings are working properly before you try this, as well as backing up your database and moodledata folders. Poor LDAP configuration could lead to users being wrongly deleted.&lt;br /&gt;
&lt;br /&gt;
If you find that the script is not running through all of your users properly and you have MS Active Directory + over 1000 users, this is because by default, MS AD only sends back 1000 users at a time. Follow the instructions [http://support.microsoft.com/kb/315071 here] to set the MaxPageSize setting to a number higher than your total number of users (both now and in future) to fix it.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Active Directory help==&lt;br /&gt;
[[Active Directory]] is Microsoft&#039;s directory service. It is included in Windows 2000 Server and later versions of their operating system. For more information about subjects below, &#039;&#039;&#039;[[Active Directory|please go here]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Warning: The PHP LDAP module does not seem to be present&lt;br /&gt;
*LDAP-module cannot connect any LDAP servers &lt;br /&gt;
*Getting correct CNs for Contexts and Creators&lt;br /&gt;
*Getting the right user_attribute&lt;br /&gt;
*Installing ldp.exe Server Tool&lt;br /&gt;
*Example Active Directory Configuration&lt;br /&gt;
*Child Domains and the Global Catalog in MS Active Directory&lt;br /&gt;
*Enabling the Global Catalog&lt;br /&gt;
*Active Directory with Moodle 1.8&lt;br /&gt;
*MS Active Directory + SSL&lt;br /&gt;
&lt;br /&gt;
==Advanced Scenarios - Multiple servers or locations==&lt;br /&gt;
For larger installations with  multiple LDAP servers, or multiple locations (contexts) in a LDAP tree.&lt;br /&gt;
&lt;br /&gt;
===Using multiple LDAP Servers===&lt;br /&gt;
Entering more than one name in the ldap_host_url field can provide some sort of resilience to your system. Simply use the syntax :&lt;br /&gt;
ldap://my.first.server ; ldap://my.second.server ; ...&lt;br /&gt;
&lt;br /&gt;
Of course, this will only work if all the servers share the same directory information, using a replication or synchronization mecanism once introduced in eDirectory and now generalized to the main LDAP-compatible directories.&lt;br /&gt;
&lt;br /&gt;
There is one drawback in Moodle 1.5 - 1.6 implementation of LDAP authentication : the auth_ldap_connect() function processes the servers sequentially, not in a round robin mode. Thus, if the primary server fails, you will have to wait for the connection to time out before switching to the following one.&lt;br /&gt;
&lt;br /&gt;
===Using multiple user locations (contexts) in your LDAP tree===&lt;br /&gt;
There is no need to use multiple user locations if your directory tree is flat, i.e. if all user accounts reside in a &#039;&#039;&#039;ou=people,dc=my,dc=organization,dc=domain&#039;&#039;&#039; or &#039;&#039;&#039;ou=people,o=myorg&#039;&#039;&#039; container. &lt;br /&gt;
&lt;br /&gt;
At the opposite, if you use the ACL mecanism to delegate user management, there are chances that your users will be stored in containers like &#039;&#039;&#039;ou=students,ou=dept1,o=myorg&#039;&#039;&#039; and &#039;&#039;&#039;ou=students,ou=dept2,o=myorg&#039;&#039;&#039; ...&lt;br /&gt;
&lt;br /&gt;
Then there is an alternative :&lt;br /&gt;
* Look at the &#039;&#039;&#039;o=myorg&#039;&#039;&#039; level with the ldap_search_sub attribute set to &#039;&#039;&#039;yes&#039;&#039;&#039;.&lt;br /&gt;
* Set the ldap_context to &#039;&#039;&#039;ou=students,ou=dept1,o=myorg ; ou=students,ou=dept2,o=myorg&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Choosing between these two solutions supposes some sort of benchmarking, as the result depends heavily on the structure of your directory tree &#039;&#039;&#039;and&#039;&#039;&#039; on your LDAP software indexing capabilities. Simply note that there is a probability in such deep trees that two users share the same &#039;&#039;common name&#039;&#039; (cn), while having different &#039;&#039;distinguished names&#039;&#039;. Then only the second solution will have a deterministic result (returning allways the same user).&lt;br /&gt;
&lt;br /&gt;
===Using LDAPS (LDAP + SSL)===&lt;br /&gt;
====Enabling LDAPS on the LDAP server side====&lt;br /&gt;
&lt;br /&gt;
* [[Active_Directory#MS_Active_Directory_.2B_SSL|Enabling LDAPS on MS Active Directory ]]&lt;br /&gt;
&lt;br /&gt;
====Enabling LDAPS on the client side (Moodle server)====&lt;br /&gt;
&lt;br /&gt;
* If you are running Moodle on MS Windows, you need to tell PHP&#039;s OpenLDAP extension to disable SSL server certificate checking. You must create a directory called &#039;&#039;C:\OpenLDAP\sysconf&#039;&#039;. In this directory, create a file called &#039;&#039;ldap.conf&#039;&#039; with the following content (If you are using certain versions of PHP 5.3.x you may need to place the file at other locations, [http://bugs.php.net/bug.php?id=48866 see PHP bug #48866]):&lt;br /&gt;
&lt;br /&gt;
 TLS_REQCERT never&lt;br /&gt;
&lt;br /&gt;
* If you are running Moodle on Linux or any other Unix-like operating system, and you want to disable SSL server certificate checking, you need to edit the OpenLDAP client configuration file (usually /etc/ldap.conf or /etc/ldap/ldap.conf or even /etc/openldap/ldap.conf) and make sure you have a line like the following one:&lt;br /&gt;
&lt;br /&gt;
 TLS_REQCERT never&lt;br /&gt;
&lt;br /&gt;
Now you should be able to use &#039;&#039;&#039;ldaps://&#039;&#039;&#039; when connecting to your LDAP server.&lt;br /&gt;
&lt;br /&gt;
If you have the certificate of the LDAPS server as a file and want to check the certificate for the connection, copy the certificate file to an arbitary directory (e.g. /etc/ldap/certificate.pem) on your client and change the content of the &#039;&#039;ldap.conf&#039;&#039; as follows:&lt;br /&gt;
&lt;br /&gt;
 TLS_REQCERT demand&lt;br /&gt;
 TLS_CACERT  /etc/ldap/certificate.pem&lt;br /&gt;
&lt;br /&gt;
When the requested server certificate is bad or not provided, the connection to the LDAPS server is immediately terminated.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Appendices==&lt;br /&gt;
===ldap auth_user_create() only suports Novell===&lt;br /&gt;
&lt;br /&gt;
After configuring user authentication with ldap I realized ldap only support edir (Novell) when combining ldap an email user confirmation. For example in my case (I use openldap) I have the following error after filling the user form:&lt;br /&gt;
&lt;br /&gt;
auth: ldap auth_user_create() does not support selected usertype:&amp;quot;rfc2307&amp;quot; (..yet)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting Resource Limits RedHat Directory Server ===&lt;br /&gt;
&lt;br /&gt;
Operational attributes can be set for the bind user DN using the command-line. &lt;br /&gt;
One can simply use ldapmodify to add the following attributes:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Attribute Name &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| nsLookThroughLimit&lt;br /&gt;
| Specifies how many entries are examined for a search operation. Giving this attribute a value of -1 indicates that there is no limit.&lt;br /&gt;
|-&lt;br /&gt;
| nsSizeLimit &lt;br /&gt;
| Specifies the maximum number of entries the server returns to a client application in response to a search operation. Giving this attribute a value of -1 indicates that there is no limit.&lt;br /&gt;
|-&lt;br /&gt;
| nsTimeLimit &lt;br /&gt;
| Specifies the maximum time the server spends processing a search operation. Giving this attribute a value of -1 indicates that there is no time limit.&lt;br /&gt;
|-&lt;br /&gt;
| nsIdleTimeout 	        &lt;br /&gt;
| Specifies the time a connection to the server can be idle before the connection is dropped. The value is given in seconds. Giving this attribute a value of -1 indicates that there is no limit.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; LDAP Console Command-Line&lt;br /&gt;
&lt;br /&gt;
 ldapmodify -h redhat_dir_server -p 389 -D &amp;quot;cn=directory manager&amp;quot; -w secretpwd&lt;br /&gt;
&lt;br /&gt;
 dn: uid=MoodleAdmin,ou=system,dc=myschool,dc=edu&lt;br /&gt;
 changetype: modify&lt;br /&gt;
 add:nsSizeLimit&lt;br /&gt;
 nsSizeLimit: 1000&lt;br /&gt;
 &amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[NTLM_authentication]]&lt;br /&gt;
* [[Active_Directory]]&lt;br /&gt;
* [[LDAP enrolment]]&lt;br /&gt;
* [http://download.moodle.org/download.php/docs/en/how-to_guides/ldap_auth_and_enrolment_set-up.pdf LDAP auth and enrolment set-up guide] (PDF 227KB)&lt;br /&gt;
&lt;br /&gt;
Using Moodle:&lt;br /&gt;
* [http://moodle.org/mod/forum/view.php?id=42 User authentication forum]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=32168 PHP LDAP module does not seem to be present] forum discussion&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=140901 Syncronisation with AUTH_LDAP_SYNC_USERS.PHP produces fewer accounts than it should] forum discussion&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=17198 Using multiple LDAP servers] forum discussion&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Authentication]]&lt;br /&gt;
&lt;br /&gt;
[[es:LDAP_authentication]]&lt;br /&gt;
[[fr:Utiliser un serveur LDAP]]&lt;br /&gt;
[[ja:LDAP認証]]&lt;br /&gt;
[[zh:LDAP认证]]&lt;br /&gt;
[[de:Authentifizierung über LDAP]]&lt;/div&gt;</summary>
		<author><name>Matthewm1970</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_10.5_Server&amp;diff=73163</id>
		<title>Step by Step Installation on a Mac OS X 10.5 Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_10.5_Server&amp;diff=73163"/>
		<updated>2010-06-17T17:31:41Z</updated>

		<summary type="html">&lt;p&gt;Matthewm1970: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X 10.5 Server]. This server is a commercial product. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested in the &amp;quot;user administration via LDAP&amp;quot; and I hope to get enough ideas how to get all Mac users into the Moodle user list automaticly.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X 10.5 Server&lt;br /&gt;
&lt;br /&gt;
==Install PHP 5.3.0 and the GD Library on the Mac OS X 10.5 Server==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: yellow; padding: 5px;&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; &amp;lt;br /&amp;gt;If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg for the following steps. Moodle 1.8.9 does not run with PHP 5.3.0 in this moment. All the other things should work in the same way for all Moodle versions.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Mac OS X Server 10.5.6 Leopard comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server needs PHP 5.2.8 (or better) and some more PHP extensions ... in this case you must get a better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically.&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second thing to configure is the file php.ini. You will find this file inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file php.ini and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.0 and the running GD library support. Congratulations ... the first step for Moodle on the Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X 10.5 Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&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;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&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;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&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;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X 10.5 you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
Following are the steps that I copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How to update with CVS==&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 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]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Matthewm1970</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_10.5_Server&amp;diff=73162</id>
		<title>Step by Step Installation on a Mac OS X 10.5 Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_10.5_Server&amp;diff=73162"/>
		<updated>2010-06-17T17:21:56Z</updated>

		<summary type="html">&lt;p&gt;Matthewm1970: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X 10.5 Server]. This server is a commercial product. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested in the &amp;quot;user administration via LDAP&amp;quot; and I hope to get enough ideas how to get all Mac users into the Moodle user list automaticly.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X 10.5 Server&lt;br /&gt;
&lt;br /&gt;
==Install PHP 5.3.0 and the GD Library on the Mac OS X 10.5 Server==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: yellow; padding: 5px;&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; &amp;lt;br /&amp;gt;If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg for the following steps. Moodle 1.8.9 does not run with PHP 5.3.0 in this moment. All the other things should work in the same way for all Moodle versions.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Mac OS X Server 10.5.6 Leopard comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server needs PHP 5.2.8 (or better) and some more PHP extensions ... in this case you must get a better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically.&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second thing to configure is the file php.ini. You will find this file inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file php.ini and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.0 and the running GD library support. Congratulations ... the first step for Moodle on the Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X 10.5 Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&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;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&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;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&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;
When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X 10.5 you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
Following are the steps that I copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How to update with CVS==&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 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]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Matthewm1970</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_10.5_Server&amp;diff=73161</id>
		<title>Step by Step Installation on a Mac OS X 10.5 Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_10.5_Server&amp;diff=73161"/>
		<updated>2010-06-17T17:14:13Z</updated>

		<summary type="html">&lt;p&gt;Matthewm1970: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X 10.5 Server]. This server is a commercial product. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested in the &amp;quot;user administration via LDAP&amp;quot; and I hope to get enough ideas how to get all Mac users into the Moodle user list automaticly.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X 10.5 Server&lt;br /&gt;
&lt;br /&gt;
==Install PHP 5.3.0 and the GD Library on the Mac OS X 10.5 Server==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: yellow; padding: 5px;&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; &amp;lt;br /&amp;gt;If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg for the following steps. Moodle 1.8.9 does not run with PHP 5.3.0 in this moment. All the other things should work in the same way for all Moodle versions.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Mac OS X Server 10.5.6 Leopard comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server needs PHP 5.2.8 (or better) and some more PHP extensions ... in this case you must get a better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically.&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second thing to configure is the file php.ini. You will find this file inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file php.ini and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.0 and the running GD library support. Congratulations ... the first step for Moodle on the Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X 10.5 Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.&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;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&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;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&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;
When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X 10.5 you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
Following are the steps that I copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How to update with CVS==&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 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]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Matthewm1970</name></author>
	</entry>
</feed>