1

I downloaded the source code and database of a website developed with moodle. I imported the database locally with the same credentials and just modified the configuration file as follows:

<?php  // Moodle configuration file

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

$CFG->dbtype    = 'mariadb';
$CFG->dblibrary = 'native';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = 'moodle_bwv';
$CFG->dbuser    = 'bwv_moodle';
$CFG->dbpass    = 'bwv_moodle$4$deploy';
$CFG->prefix    = '';
$CFG->dboptions = array (
  'dbpersist' => 0,
  'dbport' => '',
  'dbsocket' => '',
  'dbcollation' => 'utf8mb4_general_ci',
);

// $CFG->wwwroot   = 'https://bildungswerk-vielfalt.com';
// $CFG->dataroot  = '/var/www/vhosts/bildungswerk-vielfalt.com/moodledata';
// $CFG->admin     = 'admin';

$CFG->wwwroot   = 'http://localhost/bildungswerk';
$CFG->dataroot  = 'C:\\wamp64\\moodledata';
$CFG->admin     = 'admin';

$CFG->directorypermissions = 0777;

//added by cesaire to disable login token check
$CFG->disablelogintoken = true;

require_once(__DIR__ . '/lib/setup.php');

And I get the following error enter image description here

Any help would be greatly appreciated.

  • Could be different PHP versions, which version / release of Moodle are you using? See `version.php` - and what version of PHP on the the old server vs new server? Maybe also try running `php admin/cli/checks.php` – Russell England Aug 16 '23 at 11:02

0 Answers0