Problem upgrading from 2.6.1 to 2.9 (different OS and DB)

Re: Problem upgrading from 2.6.1 to 2.9 (different OS and DB)

by mohammad moreb -
Number of replies: 0

its simply just delete the config file and use empty DB then the system will generate new config file copy new code and add to your olde config file with olde DB name and path

<?php  // Moodle configuration file

unset($CFG);
global $CFG;
$CFG = new stdClass();

$CFG->dbtype    = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = '***';
$CFG->dbuser    = '****';
$CFG->dbpass    = '*******';
$CFG->prefix    = 'mdl_';
$CFG->dboptions = array (
  'dbpersist' => 0,
  'dbport' => '',
  'dbsocket' => '',
);

$CFG->wwwroot   = 'http://*****';
$CFG->dataroot  = 'D:\\*****4';
$CFG->admin     = 'admin';

$CFG->directorypermissions = 0777;

require_once(dirname(__FILE__) . '/lib/setup.php');

// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!