Problemas instalación moodle 3.8.3 servidor local MacOs

Problemas instalación moodle 3.8.3 servidor local MacOs

de Javier Sánchez -
Número de respuestas: 0

Hola!

Estoy intentando instalar moodle 3.8.3 en un servidor local con macOS, y al generar el archivo config.php me sale este mensaje:

Parse error: syntax error, unexpected 'global' (T_GLOBAL), expecting identifier (T_STRING) in /Users/javiersanchezsegura/Sites/moodle/config.php on line 12 

y no puedo seguir. He empleado mucho tiempo en configurar todo manualmente (sin MAMP) y es muy frustrante quedarme bloqueado en este punto, por lo que agradecería cualquier ayuda.

Este es el archivo config.php que genera moodel:


<?php  // Moodle configuration file

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

$CFG->dbtype    = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = 'moodle';
$CFG->dbuser    = 'root';
$CFG->dbpass    = 'Amaneci_2';
$CFG->prefix    = 'mdl_';
$CFG->dboptions = array (
  'dbpersist' => 0,
  'dbport' => 3306,
  'dbsocket' => '',
  'dbcollation' => 'utf8mb4_unicode_ci',
);

$CFG->wwwroot   = 'http://127.0.0.1/~javiersanchezsegura/moodle';
$CFG->dataroot  = '/Users/javiersanchezsegura/moodledata';
$CFG->admin     = 'admin';

$CFG->directorypermissions = 0777;

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

// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!
Promedio de valoraciones: -