Windows server: Windows 2003 IIS 6, MS SQL 2005 Installation Problems

Windows server: Windows 2003 IIS 6, MS SQL 2005 Installation Problems

by Jerry Smith -
Number of replies: 6
I'm having problems getting moodle installed on my Windows 2003 running MS SQL 2005. I am following the directions on http://www.moodlewindows.za.net/ At first I downloaded PHP 5.3.3, but then later found out that it doesn't work with moodle 1.9.9. So I deleted the PHP 5.3.3 and downloaded and setup PHP 5.2.14. I think PHP is running correctly as when I type in http://192.168.0.90/phpinfo.php in a browser, I get the gray and purple PHP configuration page. I've also verified my moodle login information by logging into MS SQL 2005 using the moodleuser and the password. The instructions say to use FreeTDS and using the follow parameters in my freetds.conf

[global]
host = 192.168.0.90
port = 1433
client charset = UTF-8
tds version = 7.0
text size = 20971520

Now I'm to step 8, install moodle. So I go to http://192.168.0.90 or http://192.168.0.90/install.php, but all I get returned is:

ADODB Error:

Does anyone know what my problem could be? At this point, I'm pretty lost.

Jeremy
jgergen@w-harrison.k12.ia.us
Average of ratings: -
In reply to Jerry Smith

Re: Windows server: Windows 2003 IIS 6, MS SQL 2005 Installation Problems

by Luis de Vasconcelos -

Jeremy, an ADODB error suggests that PHP is having a problem communicating with MSSQL. Did you enable FreeTDS in your php.ini file? You do this by adding extension=php_dblib.dll to php.ini

Does the output of PHPInfo() show a MSSQL section? If it does then it means that PHP has correctly loaded FreeTDS. Now turn on the FreeTDS logging option by adding this to your freetds.conf file:

dump file = C:\Moodle\FreeTDSDebug.log

Restart IIS and FreeTDS will create that log file. See if it contains any useful info.

You can also enable the PHP debugging option by adding this line to php.ini:

error_log = "C:\PHP\PHPErrors.log"

PHP 5.3.x does work with Moodle, but you MUST first enable the date.timezone setting to your php.ini file. Example:

[Date]
; Defines the default timezone used by the date functions
date.timezone = "Africa/Johannesburg"

Did you configure PHP to run under FastCGI? PHP 5.3 on Windows and IIS runs best under FastCGI. ISAPI should be avoided.

To make sure that Windows knows where to find and load your php.ini file make sure that the IniFilePath key under HKEY_LOCAL_MACHINE\SOFTWARE\PHP in your Windows Registry is pointing to your PHP path, e.g. 'C:\PHP'

Have you created a Moodle config.php file?

Also, it is highly recommended that you run a PHP accelerator. eAccelerator works nicely on Windows/IIS. So does the fairly new Windows Cache Extension (Wincache) module from Microsoft.

In summary, first make sure that PHP is properly configured and can connect to MSSQL before you try to install Moodle.

In reply to Luis de Vasconcelos

Re: Windows server: Windows 2003 IIS 6, MS SQL 2005 Installation Problems

by Jerry Smith -
I did enable FreeTDS in my php.ini file by adding extension=php_dblib.dll to my php.ini file.

I do see a mysql section in the phpinfo. I'll attach a screen shot.

I can not get FreeTDS to create that dump file. I've used the following after saving the freetds.conf file on my root of my C drive and doing an iisreset:

dump file = C:\Moodle\FreeTDSDebug.log
dump_file = C:\a.log
dump file = F:\a.log
dump_file = F:\Moodle\FreeTDSDebug.log

I couldn't tell whether I was supposed to use an underscore between dump and file or not, so I tried both ways, but nothing ever was created.

The PHPErrors log shows:

[30-Sep-2010 11:40:17] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_curl.dll' - The specified module could not be found.

So I deleted the php_curl.dll and copied the php_curl.dll back into the ext direction from the zip file. This corrected that error.

I just checked the registry key for PHP and it is value name IniFilePath with a value data of C:\PHP

I still get the same ADODB error when I run http://192.168.0.90/install.php in Firefox. I just get a 500 error when trying to use Internet Explorer.

Any further assistance anyone could provide would be useful.

Thank you,
Jeremy
In reply to Jerry Smith

Re: Windows server: Windows 2003 IIS 6, MS SQL 2005 Installation Problems

by Luis de Vasconcelos -

Ok, so you've established that PHP has loaded FreeTDS. Great.

There's no underscore in "dump file" so try:

dump file = C:\Whereveryouwantit\FreeTDSDebug.log
dump file append = yes
debug flags = 0x04      ;0x04 = errors, 0x02 = severe errors

Then restart IIS.

The 500 error in Internet Explorer just means that you have the "Friendly Errors" option in Internet Explorer enabled. Disable it (Tools / Internet Options / Advanced) and you should see a more helpful message.

Also, try using:

tds version = 8.0

in your freetds.conf file (instead of 7.0)

In reply to Luis de Vasconcelos

Re: Windows server: Windows 2003 IIS 6, MS SQL 2005 Installation Problems

by Jerry Smith -

Ok I have to have something wrong.  I entered what you asked and did an iisreset, but still no log file.  I've tried dumping it to the root C drive and a folder.  Here is my entire freetds.conf which is stored at the root C:\

[global]
host = 192.168.0.90
port = 1433
client charset = UTF-8
tds version = 8.0
text size = 20971520
dump file = C:\a\FreeTDSDebug.log
dump file append = yes
debug flags = 0x04      ;0x04 = errors, 0x02 = severe errors

I have verified that the directory C:\a does exist.  I'm logged in as the administrator to the server and verified I can create and delete files in that directory.

Any other suggestions?

In reply to Jerry Smith

Re: Windows server: Windows 2003 IIS 6, MS SQL 2005 Installation Problems

by Luis de Vasconcelos -

That's odd... I've used it before without problems.

Try removing the path from the dump file variable and using a shorter file name:

dump file = FreeTDS.log

It should create the dump file in your PHP directory.

Also, what happens when you specify your actual database host name instead of the IP address?