Note: You are currently viewing documentation for Moodle 2.3. Up-to-date documentation for the latest stable version is available here: Installation for Windows 2003 with IIS.

Installation for Windows 2003 with IIS: Difference between revisions

From MoodleDocs
(Updated the PHP section with details of the PHP/FastCGI option and other minor changes)
Line 1: Line 1:
*Return to [[Windows installation]]
*Return to [[Windows installation]]


We'll use IIS as the web server and MySQL as the database server. Note: It is also possible to use [https://docs.moodle.org/en/Installing_MSSQL_for_PHP MSSQL server].  
We'll use Internet Information Services (IIS) as the web server and [http://www.mysql.com/ MySQL] as the database server. Note: [https://docs.moodle.org/en/Installing_MSSQL_for_PHP Microsoft SQL Server 2005] and up is also supported.


We're assuming that IIS has been installed and also that the reader of this text is familiar with IIS configuration.
We're assuming that IIS has been installed on the server and that the reader of this text is familiar with IIS configuration.
 
[http://php.net PHP] also needs to be running on the server. See [http://www.peterguy.com/php/install_IIS6.html How to install PHP 5.x on Windows Server 2003 with IIS 6] for instructions on how to install the thread-safe version of PHP with the ISAPI extension. But, instead of that PHP/ISAPI combination, you should rather consider installing the non-thread-safe version of PHP with the FastCGI component from Microsoft. There are several legitimate claims that this is a much better and faster way to run PHP and that performance will be much better. Read the [http://www.iis-aid.com/articles/my_word/difference_between_php_thread_safe_and_non_thread_safe_binaries Difference between PHP thread safe and non thread safe binaries] article on iis-aid.com for more details.
 
Another reason why it is best to use FastCGI instead of the ISAPI extension if you are using IIS 7 is that the FastCGI component is already built-in to Microsoft IIS 7 (although it is not enabled by default so you have to [http://technet.microsoft.com/en-us/library/cc753077.aspx manually enable] it in the Server Manager).
 
A link to an article on how to setup PHP (non-thread-safe) and FastCGI on IIS 6 is available in the next section below.
 
NOTE: Before installing Moodle you should make sure that PHP is running properly i.e. that it can serve .php scripts and it can connect to your database server. Many new Moodle administrators experience problems installing Moodle because PHP has not been configured properly and they mistakingly believe that they're doing something wrong with the Moodle installation (when the problem actualy is with the PHP configuration).
 
One way to check that PHP is configured properly is to run the phpinfo() command and then check the output that it produces. Part of this output is information about how PHP will connect to the web server and the database. Many Moodle administrators have to resort to posting desperate pleas for help in the Moodle forums because they have not checked the output of phpinfo() and are unable to install Moodle because of a PHP configuration problem.


PHP: see [http://www.peterguy.com/php/install_IIS6.html How to install PHP 5.x on Windows Server 2003 with IIS 6] for instructions.


MySQL: download from [http://dev.mysql.com/downloads/] and install
MySQL: download from [http://dev.mysql.com/downloads/] and install


Then get the standard installation for Moodle from [http://download.moodle.org/ http://download.moodle.org/] and read the rest at [[Windows installation]]
Finally, get the '''Latest Stable Build''' of the '''Standard Moodle Distribution''' from [http://download.moodle.org/ http://download.moodle.org/] and read the rest of the [[Windows installation]] documentation.


== Installation for Windows Server 2003 with IIS and a MSSQL database ==
== Installation for Windows Server 2003 with IIS and a MSSQL database ==
Line 35: Line 44:


9. Setup a Moodle Cron Job
9. Setup a Moodle Cron Job
When running PHP under the FastCGI module you should use the non-thread-safe version of PHP. You will see a big performance improvement with this combination.


Detailed instructions on how to successfully perform each of the above steps is available on [http://www.moodlewindows.za.net www.moodlewindows.za.net].
Detailed instructions on how to successfully perform each of the above steps is available on [http://www.moodlewindows.za.net www.moodlewindows.za.net].

Revision as of 15:58, 4 January 2009

We'll use Internet Information Services (IIS) as the web server and MySQL as the database server. Note: Microsoft SQL Server 2005 and up is also supported.

We're assuming that IIS has been installed on the server and that the reader of this text is familiar with IIS configuration.

PHP also needs to be running on the server. See How to install PHP 5.x on Windows Server 2003 with IIS 6 for instructions on how to install the thread-safe version of PHP with the ISAPI extension. But, instead of that PHP/ISAPI combination, you should rather consider installing the non-thread-safe version of PHP with the FastCGI component from Microsoft. There are several legitimate claims that this is a much better and faster way to run PHP and that performance will be much better. Read the Difference between PHP thread safe and non thread safe binaries article on iis-aid.com for more details.

Another reason why it is best to use FastCGI instead of the ISAPI extension if you are using IIS 7 is that the FastCGI component is already built-in to Microsoft IIS 7 (although it is not enabled by default so you have to manually enable it in the Server Manager).

A link to an article on how to setup PHP (non-thread-safe) and FastCGI on IIS 6 is available in the next section below.

NOTE: Before installing Moodle you should make sure that PHP is running properly i.e. that it can serve .php scripts and it can connect to your database server. Many new Moodle administrators experience problems installing Moodle because PHP has not been configured properly and they mistakingly believe that they're doing something wrong with the Moodle installation (when the problem actualy is with the PHP configuration).

One way to check that PHP is configured properly is to run the phpinfo() command and then check the output that it produces. Part of this output is information about how PHP will connect to the web server and the database. Many Moodle administrators have to resort to posting desperate pleas for help in the Moodle forums because they have not checked the output of phpinfo() and are unable to install Moodle because of a PHP configuration problem.


MySQL: download from [1] and install

Finally, get the Latest Stable Build of the Standard Moodle Distribution from http://download.moodle.org/ and read the rest of the Windows installation documentation.

Installation for Windows Server 2003 with IIS and a MSSQL database

The above instructions will help you setup Moodle with MySQL. But what if you want to (or have to) use MSSQL as your database engine?

Installing Moodle on Windows Server 2003 with IIS and MSSQL 2005 is a 9 step process:

1. Setup PHP on the web server

2. Install FastCGI on the web server

3. Configure the PHP script mapping in IIS

4. Create a Moodle application in IIS

5. Configure PHP to work with Microsoft SQL Server 2005

6. Create the Moodle database and database login

Now you're almost ready, but first:

7. Test the PHP configuration - if PHP is not working or has not been configured correctly Moodle will not install.

8. Install Moodle

9. Setup a Moodle Cron Job

Detailed instructions on how to successfully perform each of the above steps is available on www.moodlewindows.za.net.