Fatal error

Fatal error

Kyoryu Kevin -
回帖数:3

I am on moodle 3.9.3, doing some coding to secure my webpage as it is not secure due to mixed content. However after I have done, I have this error on my home page and only homepage. 

Fatal error: require_once(): Failed opening required '/course/lib.php' (include_path='.:/usr/local/php74/pear') in /home/customer/www/data.ilearningspace.net/public_html/config.php on line 31

global $CFG;

$CFG = new stdClass();

$CFG->dbtype    = 'mysqli';

$CFG->dblibrary = 'native';

$CFG->dbhost    = 'localhost';

$CFG->dbname    = 'giinmedi_datamoodle';

$CFG->dbuser    = 'giinmedi_datamod';

$CFG->dbpass    = 'P@ssw0rd12345678';

$CFG->prefix    = 'mdl_';

$CFG->dboptions = array (

  'dbpersist' => 0,

  'dbport' => '',

  'dbsocket' => '',

  'dbcollation' => 'utf8_general_ci',

);

$CFG->wwwroot   = 'http://data.ilearningspace.net';

$CFG->dataroot  = '/home/customer/www/data.ilearningspace.net/moodledata2';

$CFG->admin     = 'admin';

$CFG->directorypermissions = 0777;

$CFG->usepaypalsandbox = 1;

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

This is my code.

I hope to get this fixed. Thanks

回复Kyoryu Kevin

Re: Fatal error

Ken Task -
Particularly helpful Moodlers的头像

Am looking at config.php for a 3.9.highest sandbox server and see at the top of
config.php, this line:

unset($CFG);

Your clip appears to be missing that line.

Is this line:
$CFG->usepaypalsandbox = 1;
line 31 in your config.php file?

Please see and read:

https://docs.moodle.org/dev/Setting_up_PayPal_development

where it shows what to set for usepaypalsandbox variable.

'SoS', Ken


回复Ken Task

Re: Fatal error

Kyoryu Kevin -
Thank you for your help.
回复Kyoryu Kevin

Re: Fatal error

Ken Task -
Particularly helpful Moodlers的头像

Welcome!  Please feel free to rate the response that helped as 'useful'.   It's a another way to say 'thanks' and at the same time provide some 'free advertising' from a 'satisfied customer'.

'SoS', Ken