I've got my self all confused with the vast amount of conflicting advice on the net with regards to the proper installation of Moodle on a server 2008 environment. Its server 2008 32 bit ed running as a webserver with IIS7 and FastCGi installed.
I have used the non-thread safe build of PHP and will use MySQL too. At first i used SQL server 2005 but found out this was no good.
I set up php and run php -i in command prompt and it floods with text so i assume its working, however if i create a php file with the php info and place it in the wwwroot folder, i get a internal 500 error.
My installation of moodle is in C:\inetpub\wwwroot
I have set up a site in IIS 7 and pointed it to this location.
I set up MySQL via this site and successfully created the moodle database with the user being moodleuser.
I just wanted to know if i'm doing things right of should i just go back and start again using server 2003 and IIS6?
thanks
Paul
You can follow my instructions.
First let me know, Are you willing to start from scratch?
thanks for your reply
If you do not want to reinstall Server 2008, you can do this:
- Point your "default web site" back to /inetpub/wwwroot/
- The run "start /w pkgmgr.exe /uu:IIS-WebServerRole;WAS-WindowsActivationService" from the elevated command prompt (start->right click on command prompt -> run as administrator)
- Restart the computer
- Uninstall MySQL if installed
- Remove/delete PHP directory that you installed
- You should be clean.
-Keshwar
Thanks for your help
Paul
Download the following to your desktop (do not Install):
Web platform 2.0
Xamp for Windows
MySQL Essentials
After you finish downloading these, Install the web platform 2.0 Installer with these options (Select web platform tab on the left):
- Web Server (Click Customize)
- Common HTTP Features
- Static Content
- Default Document
- Directory Browse
- HTTP Errors
- HTTP Redirection
- URL Rewrite 1.1
- Application Development
- ASP.NET
- .NET Extensibility
- CGI
- ISAPI Extensions
- ISAPI Filters
- Server Side includes
- Compatibility
- IIS Metabase and IIS 6 Configuration Compatibility
- IIS 6 Management Console
- Deployment and Publishing
- Health and Diagnostics
- HTTP Logging
- Logging Tools
- Request Monitor
- Management (Choose All Features)
- Media (Optional)
- Performance (Choose All Features)
- Security
- Request Filtering
- WAS (Choose All Features)
- .NET Framework
- .NET Framework 3.5 SP1
- PHP
- PHP 5.2.8-2
I installed Webplatform like you said and restarted. I look to local host but just get the 'Page cannot be displayed' Is this supposed to happen?
thanks for your help on this,
Paul
Open IIS Manager and make sure that your sites are running
and
Have you ever altered your host file?
I cant even get my test.php file to show. Its in inetpup\wwwroot with this code in the file
<?php phpinfo();?>
Re-installed the WPI exactly how you desribed, the IIS6 compatability mode was missing from the last attempt.
127.0.0.1 localhost
::1 localhost
If you have a public address for moodle i.e "learn.example.com"
127.0.0.1 localhost learn.example.com
::1 localhost
also in IIS Manager a make sure bindings on your Default Web Site is set to "All Unassigned"
I have the Moodle folder in the wwwroot, and pointed the default document to index.php. Now when i look to localhost i get this http error 404.3
'The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.'
Should i have installed the MySQL essentials and xampp? i havent yet but as you can tell i'm the moodle virgin
we will get to that later
- OK to the vista notice
- intsall to the C:\xampp\ folder
- SERVICE SECTION (important!!)
- All boxes unchecked!!!
- All boxes unchecked!!!
i have a Xampp control panel on the desktop
This installation is tricky on Windows Server 2008, so please follow closely. It seems like no one but me of course
- Run the installer
- Select Custom
- click on "MySQL Sever Datafiles" then click "Change.."
- Change folder name to: C:\MySQL\MySQL Server 5.1\
- Click next until... Wizard complete
- Configure the MySQL Server now (CHECKED)
- Click finish
- MySQL Server Instance Config
- Detailed Configuration
- Server Machine
- Multifunctional Database
- Click next to..
- Inline Transacftion Processing (OLTP)
- Check the "add firewall exception for this port"
- Best Support for Multilingualism
- Change service name to MySQL51
- Uncheck "Modify Security Settings" Important
- Execute
- Reconfigure Instance
- MySQL Server Instance Config
- Detailed Configuration
- Server Machine
- Multifunctional Database
- Click next to..
- Inline Transacftion Processing (OLTP)
- DO NOT Check the "add firewall exception for this port"
- Best Support for Multilingualism
- Change service name to MySQL51
- Check "Modify Security Settings" Important
- Current password blank
- Enter new password
- confirm
- check enable root access
- Execute
- MySQL Server Instance Config
Thanks for that, its all done. You must have replied after i left last night, sorry about the delay.
Paul
Then inside that folder you are going to create another folder "Moodle1" you can now extract Moodle zip file into the c:\WebApps\Moodle1\
I think before i set it up you should know that this moodle site is for a Private school. I am the IT support technician for the school but my opensource knowledge is minimal.
i would like it to be linked into our current website in some way http://www.theglasgowacademy.org.uk and I know that some ISA server configuration will be needed however i think i'll be fine once i get the finer points of just setting it up.Also i wanted to set it up so that our users can use their Windows domain logins. Thats the only way my boss wants it set up. Our site is on its own webserver, however the moodle set up is running on a test server but only a Dell Optiplex 745 PC running server 2008.
If i set it up successfully we will buy in a dedicated server for moodle.
Like i said i really appreciate the help with this
Paul
I don't mind following the steps - I couldn't commit to Skype contact due to the nature of the job, they expect me to just drop everything when theres a problem.
I've created these folders..
you'll be pleased to know that i re-installed Server 2008 and followed the steps again. I know get the IIS.htm showing when i look at localhost.
It was obvious my tinkering before had done something to the setup.
Ta
one thing...the moodle1 folder now contains a Server folder and a startmoodle and stopmoodle file. Shouldnt it not just be the moodle directory thats in the folder?
Hello Keshwar,
I'm following close your instructions because I have has the same problem that Paul had... what should we do next after creating the Webapps folder?
Many thanks, your instructions are the only one really working until now!
MySQL is correctly installed on my Win2008 32bit Server, and I already had FastCGI running on IIS7... though, Moodle install.php won't start for some ackward reason ...
Now I'm following your instructions, I really need Moodle running and I wouldn't like to use Apache...
Stefano
Now we are going to configure PHP on Windows Server 2008 the right way. If you were following my directions to this point you should have 2 PHP Installations.
- c:\program files\PHP (B.S.)
- c:\xampp\php (Real)
- Find "Handler Mappings" icon and then double click it
- Find "PHP_via_FastCGI" then double click it
- Under Executable (Optional): change to c:\xampp\php\php-cgi.exe then click OK
- The next dialog that pops up click "Yes"
- Click on your server name again in the left pane to bring up all the icons
- Find "FastCGI Settings" and double click
- You should see two lines
- c:\program files\PHP\php-cgi.exe
- c:\xampp\php\php-cgi.exe
- Double click the 2nd (c:\xampp\php\php-cgi.exe )
- Click the word (collection) then click the little grey button to the right:
- Click add on the left, then on the right change the word "Name" on the right to PHP_FCGI_MAX_REQUESTS the value to 10000
- Click add on the left again, then on the right change the word name "Name" on the right to PHPRC and the value to c:\xampp\php\
- Click OK
- Change "InstanceMaxRequests" to 10000
- Close your IIS7 Manager
This way I can respond, while I do my job. just click here
subscribe for the updates.
Hi,
I've been following the installation steps, posted by Keshwar, but it seems to have stopped halfway through. Does anyone know where i can find the remaining steps.
I've clicked on the link posted by Keshwar and i can't find anything
This is the link that looks most useful.
I had IIS7 setup with PHP and installed MySql.
Like this thread PHP was working fine but could not connect to the mysql database. My error was that the Mysql server is not responding.
I downloaded the Microsoft Web Platform Installer 2.0 and followed the notes on link above to complete an install. The phpMyAdmin setup on my IIS server is now connecting correctly to MySQL. So now will complete Moodle install.
http://www.microsoft.com/web/gallery/Moodle.aspx
which uses the Web platform installer and also installs Moodle as well as IIS/PHP etc..
Couple of things that need to change after installation
1: $CFG->wwwroot - needs to be an actual url instead of using the calculated method guessing the url from server headers.
2. Ideally $CFG->dataroot should be moved outside the webroot - the WPI doesn't allow you to manipulate directories outside the webroot - it does use a web.config file to "protect" the files from being accessible, but it's not really great practice.
The old version of the installer (currently the public one at the moment) doesn't force you to use a nice secure DB password and doesn't set up the password salt (the new one which I hope MS will review at some point in the next few weeks) does.
Keshwar mentions "on the root of your site" - the WPI installer places moodle in a sub-directory on the website that you select (if only one is installed it just uses the "default" website which should be fine)
Keshwar - have you used/seen the WPI installer? - could you please elaborate on what you mean by not suitable for production and why?
I have just installed moodle via the WPI, all seems well (PHP works fine, phpmyadmin works fine), except during moodle install when the installer script tries to use C:\inetpub\moodledata as the files path it is not allowed to do so, due to the permissions applied to the web server.
How can we modify the security settings to allow moodle to use a datadir outside the wwwroot folder? as normally accepted on other installs.
Cheers,
Josh
After the installation is complete you will need to perform this step manually by moving the directory somewhere else, assigning appropriate permissions and updating the config.php with the detail.
Dan, OK so manually move the moodledata folder then change config.php to suit the new path, but doesnt the server still disallow file actions in the new data directory path as it is outside the webroot?
Check out some of the full Windows install instructions for how to create a moodledata directory and give your web user access to write to it.
I just ran the installer from the link posted above http://www.microsoft.com/web/gallery/Moodle.aspx
This works great and the only configuration needed was in IIS7, point the "default web site" to the moodle directory, added the host header and away it goes... Up and running in less than 30min.
The installer will install
FastCGI, Web Deployment Tool, MySQL, PHP, Windows Cache Ext for PHP and MySQL Windows Essential. See attachment
Thanks.
I have installed apache 2.2.14,php5.2.13 &mysql 5.1.46 on windows 2003 server. when i am calling install.php it give an error "The page cannot be displayed". Can u help???
Can the present (web platform Moodle version 1.9.x be upgraded to version 2.x?
Give me.. your email, im going to send you my php files .. im running ws2008rs, SQL SERVER r2 2008 and php 5.14 all this are for moodle 2.0