My test computer is a WinXP SP2 box with MS SQL 2005 (9.00.1399.00) and IIS 5.1, PHP version 5.2.9-2 thread-safe and FastCGI. I’ve successfully installed Moodle 1.9 on this computer a lot of times – I currently have a working version of 1.9.6 running as a separate installation.
But when I install Moodle 2.0 (build 20100319) I can’t finish the installation. This document outlines the problems I’m experiencing. I have previously been able to successfully install earlier builds of Moodle 2 on this computer.
I’m connecting to MSSQL via FreeDTS (Eloy’s build). I’ve created a config.php in my Moodle folder and specified: $CFG->dbtype = 'mssql_n';
http://tracker.moodle.org/browse/MDL-21874
Despite the above warning I decide to continue with the installation. I continue and, after a few seconds, get the following error:
I click the Continue button and I get this message:
I’m at a dead-end…
I then enable SOAP in by uncommenting extension=php_soap.dll in my php.ini file. I create a new blank database and restart the setup. I get the following screens and errors:
Server checks are now ok so I click Continue and then I get this message:
If I look at the database I see that the tables have been created - there are 65 tables in the Moodle2 database.
Next I try doing the installation again with a new blank database and NO config.php file.
The install.php page gives me the following options for the database driver. Notice that there is no option to choose MSSQL as the database type! Why? Without a MSSQL option I can’t continue!
I can’t use any of these 3 options to connect to MSSQL.
I’ve just seen the request by Petr in MDL 21874 to add the debug code. So I’ve added this to config.php.
@error_reporting(1023);
@ini_set('display_errors', '1');
$CFG->debug = 38911;
$CFG->debugdisplay = true;
Now after the DDL sql execution error error I see this debug info:
Debug info: Could not create constraint. See previous errors.<br /<br />CREATE TABLE mdl2_mnet_host2service ( id BIGINT NOT NULL IDENTITY(1,1), hostid BIGINT NOT NULL DEFAULT 0, serviceid BIGINT NOT NULL DEFAULT 0, publish SMALLINT NOT NULL DEFAULT 0, subscribe SMALLINT NOT NULL DEFAULT 0, CONSTRAINT mdl2_mnethost_id_pk PRIMARY KEY (id) )
Stack trace:
· line 378 of \lib\dml\moodle_database.php: ddl_change_structure_exception thrown
· line 268 of \lib\dml\mssql_native_moodle_database.php: call to moodle_database->query_end()
· line 612 of \lib\dml\mssql_native_moodle_database.php: call to mssql_native_moodle_database->query_end()
· line 86 of \lib\ddl\database_manager.php: call to mssql_native_moodle_database->change_database_structure()
· line 73 of \lib\ddl\database_manager.php: call to database_manager->execute_sql()
· line 454 of \lib\ddl\database_manager.php: call to database_manager->execute_sql_arr()
· line 406 of \lib\ddl\database_manager.php: call to database_manager->install_from_xmldb_structure()
· line 1179 of \lib\upgradelib.php: call to database_manager->install_from_xmldb_file()
· line 176 of \admin\index.php: call to install_core()