New Install: ERROR: Could not update release version in database!!

New Install: ERROR: Could not update release version in database!!

by Mark Bishop -
Number of replies: 7
I'm doing a new install of v1.7 and it's not working. When the install script starts creating the database, it creates the database and then gives me the error:

ERROR: Could not update release version in database!!

Then when I continue I get:

A problem occurred inserting current version into databases

Any assistance would be appreciated.

Thanks.

FYI, I'm running php4.4.1, MySQL 5.0.24... Anything else that would be helpful??
Average of ratings: -
In reply to Mark Bishop

Re: New Install: ERROR: Could not update release version in database!!

by rob mock -

Same problem for me. 

Only thing I would add is that everything "feels" like it worked through the whole installation and then it chokes at the very end.

It created 53 tables in the database.

In reply to rob mock

Re: New Install: ERROR: Could not update release version in database!!

by rob mock -

Maybe Moodle's not for me...

Tried 1.6.3 as opposed to 1.7 and got same error.  Am attaching the text of the output page that I'm getting. 

This time it made 46 tables.

For one more shot I figured I'd try installing without using any table prefix.  No luck.

In reply to rob mock

Re: New Install: ERROR: Could not update release version in database!!

by rob mock -

I waited half a year and hoped the installation would now work...  Alas, same problem as before.  I am an ipowerweb hosted user, and the upload/unpacking went fine, as did much of the install.

I end up with the same "ERROR: Could not update release version in database!!"

I took Ken's advice and inserted "version" and "2007021510" into the config table, but it gets me no further in the installation.

One curious thing: after I re-try the installation, I see that the installer has put in a 2nd row into the config table with id=2, version=0, and value=1.8

It's been a while since my last attempt, but I think I also recall an ipowerweb host-specific problem: some mySQL setting with "strict tables" or something?

Am I even close to getting this to work? 

In reply to rob mock

Re: New Install: ERROR: Could not update release version in database!!

by Richard Enison -

RM,

Maybe. I'm not exactly a Moodle expert yet (but long-time programmer) and I don't know about most of the things you have reported. HOWEVER, the last thing you said in your last post jumped off the screen at me as a red flag: black eye

Moodle 1.6 or higher does not work with MySQL in strict mode (see http://docs.moodle.org/en/Installing_Moodle#Requirements, the last couple of paragraphs of the Requirements section).

RLE

In reply to Mark Bishop

Re: New Install: ERROR: Could not update release version in database!!

by Ken Wilson -

Hi Mark, Rob

You could try to do the insert manually. Use your database admin program (phpmyadmin, mysql -u root -p, etc) and execute these lines:


If you get an error with the above (probably ERROR 1062 (23000): Duplicate entry 'version' for key 2), then the row has been created, so try updating it manually:


Hope this gets things further!

Ken

In reply to Ken Wilson

Re: New Install: ERROR: Could not update release version in database!!

by rob mock -

Thanks for the reply, Ken.

Before I got your post, I trashed the whole 1.7 install and am currently FTP'ing 1.6 (am using FTP because my ipowerweb hosted server for some reason is hanging up trying to untar these moodle packs).  I'm a first-time Moodler, but I imagine there's an upgrade script to get from 1.6 to 1.7. 

Since I don't have any data to lose, I don't mind making rash decisions.

If I also fail at the 1.6 install, then I'll retry 1.7 and use your advice.

In reply to Mark Bishop

Re: New Install: ERROR: Could not update release version in database!!

by Matt Lyons -

Hi Guys,

I had the same problem too. Tried many things with no success. Finally got it to work with ODBC. Here are the install steps I used: 

  1. Create a system DSN named "moodle" that points to the SQL Server database.
  2. Delete all existing database tables.
  3. Delete existing Moodle config file.
  4. Go through the install process until it errors out (select mssql at the database config page).
  5. Edit your Moodle config file to have the following values:
    $CFG->dbtype    = 'odbc_mssql';
    $CFG->dbhost    = 'moodle';
    $CFG->dbname    = '';
    $CFG->dbuser    = 'moodle';
    $CFG->dbpass    = '<database password>';
    $CFG->dbpersist =  false;
    $CFG->prefix    = 'mdl_';
    (note: the config file was not properly created for me just going through the wizard when 'odbc_mssql' was selected)
  6. Delete all database tables.
  7. Rerun the install.php script.

At this point you should see the license agreement and then the tables should be immediately created and populated (not rerun the configuration steps). There are about 10 screens of database sql statements that create tables, populate with data and various updates. By the end of it I had about 163 tables.

There is a warning when selecting odbc_mssql that says "Experimental! (not for use in production)". I would sure be interested in any comments about ODBC being experimental. But ODBC works whereas mssql didn't.

I hope all that helps or maybe someone can point what to do to get mssql to work. Thanks.