Please follow moodle's default installation procedure to setup a fresh moodle-installation.
As moodle brings along its own and modified version of PEAR, we have to modify it as part of the installation. The conflict arises when moodle includes its own PEAR-implementation, which tries to define some already loaded PEAR-functions and generates a fatal PHP error. To fix this, please insert
// START FIX edu-sharing if ( ! function_exists('_PEAR_call_destructors') ) {
at line 28 in file /path/to/moodle2/lib/pear/PEAR.php. The closing bracket
} // END FIX edu-sharing
goes to the very end of the same file.
The fresh moodle-installation hast to configured before put to use. Please configure moodle to use its database for session-management and set a unique cookie-prefix to avoid cookie-session-mixup.
To configure esrender's mod_moodle please open the file /path/to/esrender/mod/moodle2/config.php and set the installation-path to moodle.
<?php define('MOODLE_BASE_DIR', '/path/to/moodle2');
Don't worry about the name 'MOODLE_BASE_DIR' being the same as for esrender's mod_moodle, as either mod_moodle or mod_moodle2 will be loaded by esrender.