Moodle setup dies connecting to DB....

Moodle setup dies connecting to DB....

by Philip Brooks -
Number of replies: 5
I have been tasked with setting up moodle for a school of 250. Due to other needs I must use IIS 6. So I found a great step by step guide on how to get moodle, mysql, and PHP working together. Unfortunately something is amiss....
During the initial setup for moodle when i get to the DB configuration i get 1 of two errors (depending on which version of PHP i have installed.
1) With the latest builds of everything when I put in the name and password for the DB and hit next the connection times out after 5-8 seconds and my IIS crashes faulting the php5iaspi <sp>.
2) I will get a PHP access violation and the IIS server will crash

This has happened on two completely separate test machines, both running Server 2003 R2 So I must assume that the guide is missing some crucial step (the guide is several years old judging by the versions it used) or I am doing something very wrong.

How the HECK do i get this to work?

For reference I have tried both Moodle 1.9 and 1.8 and every PHP build from 5.2.0 forward.

Does anyone have a explanation or maybe a recent how too guide for moodle +IIS 6 that works?

Pretty please? smile


PS. Did some more looking and YES the php info shows a mysql entry but only 3 lines (0,0, and 5.1.34 are the result fields)


-Phil
Average of ratings: -
In reply to Philip Brooks

Re: Moodle setup dies connecting to DB....

by Luis de Vasconcelos -

Start at the beginning: How are you setting up PHP? What steps are you following? What have you done to check that PHP is running properly?

Have you tried running PHP under Microsoft's FastCGI (assuming that you're running Windows...)?

In reply to Luis de Vasconcelos

Re: Moodle setup dies connecting to DB....

by Philip Brooks -
PHP is setup as follows (short version as my notes are at work)

Copy contents of .zip folder into c:\php5

copy php.ini-reccomended to c:\windows as php.ini and edit it to allow the proper extensions, up the size limits on uploads and set the cgi.force <sp> to 0
copy the ts.dll to c:\windows\system32

tell IIS6 how to handle php by adding the php5isapi.dll <sp> to it, seeting it active, etc...

add index.php to the documents list in IIS6

create the test.php file with phpinfo() in it

restart iis6 and browse to the test.php file

returns a php information screen
(should the mysql area be only 3 lines and only have 0,0, and the version number under the results side of the list?)



That is the setup in short. I have seen, thanks to other threads, that I should be putting c:\php5 in the PATH at the very beginning so I will try that. I also will try the setup located at http://www.peterguy.com/php/install_IIS6.html as there are a few steps that were nto on the other instructions I had.

I have not tried fastcgi, that is the next step...once i figure out how to do that under iis6 and not iis7 (whish is stupid easy but sadly not availiable at this jobsite.)

I will be testing a few more things today so I will get back to you.
In reply to Philip Brooks

Re: Moodle setup dies connecting to DB....

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I wonder if you are having the same problem I had a couple of months ago, when I installed everything by hand.

I had MySQL's bin directory in the path before PHP's directory, and PHP was trying to use MySQL's client DLLs, instead of its own client DLLs, and it was crashing as soon as it tried to use them.

I removed MySQL's bin directory from the path, and everything started to work as expected.

Saludos. Iñaki.

In reply to Iñaki Arenaza

Re: Moodle setup dies connecting to DB....

by Philip Brooks -
I will try that when i go to the office in a few hours. Thanks for the reply!
In reply to Philip Brooks

Re: Moodle setup dies connecting to DB....

by Philip Brooks -
Yup.. Thats all it took. setting the c:\php5 at the beginning of the PATH got it working!


TY