Moodle

Can't update from Moodle 1.9.4+ to Moodle 2.0

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.9.4
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    Mac OS X 10.5.6 Server with PHP 5.2.9
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE

Description

I installed Moodle 1.9.4+ (Build: 20090329) on the Mac OS X 10.5.6 Server with PHP 5.2.9.
Please look at http://docs.moodle.org/en/Step_by_Step_Installation_on_a_Mac_OS_X_10.5_Server

I installed Moodle 1.9.4+ (Build: 20090329) because I wanted to update to Moodle 2.0.
It could be that this problem is the same as I wrote in http://tracker.moodle.org/browse/MDL-18737

Moodle 1.9.4+ works fine but upgrading to Moodle 2.0 does not work. I get the following error message

__________________________________________________________________________________________

Error: Database connection failed
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php
__________________________________________________________________________________________

Moodle uses the normal config.php (the names are moodle20 because I want to update)

<?php /// Moodle Configuration File

unset($CFG);

$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle20';
$CFG->dbuser = 'moodle';
$CFG->dbpass = 'moodle!';
$CFG->dbpersist = false;
$CFG->prefix = 'mdl_';

$CFG->wwwroot = 'http://192.168.0.220/moodle20';
$CFG->dirroot = '/Library/WebServer/Documents/moodle20';
$CFG->dataroot = '/Library/WebServer/moodledata/moodle20';
$CFG->admin = 'admin';

$CFG->directorypermissions = 00777; // try 02777 on a server in Safe Mode

require_once("$CFG->dirroot/lib/setup.php");
// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
?>

Activity

Hide
Martin Dougiamas added a comment -

any ideas, eloy?

Show
Martin Dougiamas added a comment - any ideas, eloy?
Hide
Ralf Krause added a comment -

The server test says that an update should work.

You can look yourself on http://moodle4mac.dyndns.org:8080/moodle19/
Login with admin / 12345 to see the facts yourself.

Show
Ralf Krause added a comment - The server test says that an update should work. You can look yourself on http://moodle4mac.dyndns.org:8080/moodle19/ Login with admin / 12345 to see the facts yourself.
Hide
Petr Škoda (skodak) added a comment -

Please make sure MySQLi PHP extension is installed, then change your config.php to include
$CFG->dbtype = 'mysqli';

please note the added "i".

Show
Petr Škoda (skodak) added a comment - Please make sure MySQLi PHP extension is installed, then change your config.php to include $CFG->dbtype = 'mysqli'; please note the added "i".
Hide
Ralf Krause added a comment -

Yes, a few days later I know this fact about mysqli.

I will just change Moodle4Mac but I wonder that I had no problem to update Moodle 2.0 up to the current version without using the mysqli database connection in my Moodle4Mac distribution. I think that the reason was that I did not update from Moodle 1.9 but from Moodle 2.0 (20090130).

At first I thought that Mac OS X 10.5 Server uses the software in a different way such I found this with PHP5 ... the server normally does not use the GD library and there could be a problem with MySQL, too. I think it was only my problem with the configuration in my.ini and the database connection. I will document my settings in the Moodle docs.
http://docs.moodle.org/en/Step_by_Step_Installation_on_a_Mac_OS_X_10.5_Server

Thanks for your support

Show
Ralf Krause added a comment - Yes, a few days later I know this fact about mysqli. I will just change Moodle4Mac but I wonder that I had no problem to update Moodle 2.0 up to the current version without using the mysqli database connection in my Moodle4Mac distribution. I think that the reason was that I did not update from Moodle 1.9 but from Moodle 2.0 (20090130). At first I thought that Mac OS X 10.5 Server uses the software in a different way such I found this with PHP5 ... the server normally does not use the GD library and there could be a problem with MySQL, too. I think it was only my problem with the configuration in my.ini and the database connection. I will document my settings in the Moodle docs. http://docs.moodle.org/en/Step_by_Step_Installation_on_a_Mac_OS_X_10.5_Server Thanks for your support
Hide
Joao Oliveira added a comment -

This a problem of MacOS 10.6 file /etc/php.ini: you should replace "/var/mysql/mysql.sock" with "/tmp/mysql.sock" and your problem will be solved.

Show
Joao Oliveira added a comment - This a problem of MacOS 10.6 file /etc/php.ini: you should replace "/var/mysql/mysql.sock" with "/tmp/mysql.sock" and your problem will be solved.
Hide
Petr Škoda (skodak) added a comment -

Hello, this is most probably a server configuration issue, please use moodle.org forums for support.

Petr Škoda

Show
Petr Škoda (skodak) added a comment - Hello, this is most probably a server configuration issue, please use moodle.org forums for support. Petr Škoda

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: