"Si pero es un trabajito pesado para un usuario modificar codigo fuente para que dicha aplicacion trabaje con SQLite, no se en que esta hecho Moodle, pero si es en PHP tendria que buscar el soporte de SQLite para PHP el modulo..."moodle está hecho en php, a la hora de modificar el código fuente, qué tengo q hacer??
por ejemplo lo q tendría q modificar en install.php:
$INSTALL['dbtype'] = 'mysql';
if ($INSTALL['dbtype'] == 'mysql') { /// Check MySQL extension is present
if (!extension_loaded('mysql')) {
$errormsg = get_string('mysqlextensionisnotpresentinphp', 'install');
$nextstage = DATABASE;
}
}
if (empty($INSTALL['prefix']) && $INSTALL['dbtype'] != 'mysql') { // All DBs but MySQL require prefix (reserv. words)
$errormsg = get_string('dbwrongprefix', 'install');
$nextstage = DATABASE;
}
if (empty($errormsg)) {
error_reporting(0); // Hide errors
if (! $dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'],$INSTALL['dbname'])) {
/// The following doesn't seem to work but we're working on it
/// If you come up with a solution for creating a database in MySQL
/// feel free to put it in and let us know
if ($dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'])) {
switch ($INSTALL['dbtype']) { /// Try to create a database
case 'mysql':
if ($db->Execute("CREATE DATABASE {$INSTALL['dbname']};")) {
$dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'],$INSTALL['dbname']);
} else {
$errormsg = get_string('dbcreationerror', 'install');
$nextstage = DATABASE;
}
break;
}
}
} else {
/// We have been able to connect properly, just test the database encoding now.
/// It must be Unicode for 1.8 installations.
$encoding = '';
switch ($INSTALL['dbtype']) {
case 'mysql':
/// Get MySQL character_set_database value
$rs = $db->Execute("SHOW VARIABLES LIKE 'character_set_database'");
if ($rs && $rs->RecordCount() > 0) {
$records = $rs->GetAssoc(true);
$encoding = $records['character_set_database']['Value'];
if (strtoupper($encoding) != 'UTF8') {
/// Try to set the encoding now!
if (! $db->Metatables()) { // We have no tables so go ahead
$db->Execute("ALTER DATABASE `".$INSTALL['dbname']."` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci");
$rs = $db->Execute("SHOW VARIABLES LIKE 'character_set_database'"); // this works
}
}
/// If conversion fails, skip, let environment testing do the job
}
break;
case 'postgres7':
/// Skip, let environment testing do the job
break;
case 'oci8po':
/// Skip, let environment testing do the job
break;
}
}
}
error_reporting(7);
if (($dbconnected === false) and (empty($errormsg)) ) {
$errormsg = get_string('dbconnectionerror', 'install');
$nextstage = DATABASE;
}
<td class="td_mainheading" colspan="2">
<p class="p_mainheading"><?php echo $headstagetext[$nextstage] ?></p>
<?php /// Exceptionaly, depending of the DB selected, we show some different text
/// from the standard one to show better instructions for each DB
if ($nextstage == DATABASE) {
echo '<script type="text/javascript" defer="defer">window.onload=toggledbinfo;</script>';
echo '<div id="mysql" name="mysql">' . get_string('databasesettingssub_mysql', 'install') . '</div>';
echo '<div id="postgres7" name="postgres7">' . get_string('databasesettingssub_postgres7', 'install') . '</div>';
echo '<div id="mssql" name="mssql">' . get_string('databasesettingssub_mssql', 'install');
/// Link to mssql installation page
echo '<p align="right"><a href="
http://docs.moodle.org/en/Installing_MSSQL_for_PHP" target="_blank">';
echo '<img src="' . $INSTALL['wwwrootform'] . '/pix/docs.gif' . '" alt="Docs" class="iconhelp" />';
echo get_string('moodledocslink', 'install') . '</a></p>';
echo '</div>';
echo '<div id="mssql_n" name="mssql">' . get_string('databasesettingssub_mssql_n', 'install');
/// Link to mssql installation page
echo '<p align="right"><a href="
http://docs.moodle.org/en/Installing_MSSQL_for_PHP" target="_blank">';
echo '<img src="' . $INSTALL['wwwrootform'] . '/pix/docs.gif' . '" alt="Docs" />';
echo get_string('moodledocslink', 'install') . '</a></p>';
echo '</div>';
echo '<div id="odbc_mssql" name="odbc_mssql">'. get_string('databasesettingssub_odbc_mssql', 'install');
/// Link to mssql installation page
echo '<p align="right"><a href="
http://docs.moodle.org/en/Installing_MSSQL_for_PHP" target="_blank">';
echo '<img src="' . $INSTALL['wwwrootform'] . '/pix/docs.gif' . '" alt="Docs" class="iconhelp" />';
echo get_string('moodledocslink', 'install') . '</a></p>';
echo '</div>';
echo '<div id="oci8po" name="oci8po">' . get_string('databasesettingssub_oci8po', 'install');
/// Link to oracle installation page
echo '<p align="right"><a href="
http://docs.moodle.org/en/Installing_Oracle_for_PHP" target="_blank">';
echo '<img src="' . $INSTALL['wwwrootform'] . '/pix/docs.gif' . '" alt="Docs" class="iconhelp" />';
echo get_string('moodledocslink', 'install') . '</a></p>';
echo '</div>';
} else {
if (!empty($substagetext[$nextstage])) {
echo '<p class="p_subheading">' . $substagetext[$nextstage] . '</p>';
}
}
?>
</td>
<?php choose_from_menu (array('mysql' => get_string('mysql', 'install'),
'oci8po' => get_string('oci8po', 'install'),
'postgres7' => get_string('postgres7', 'install'),
'mssql' => get_string('mssql', 'install'),
'mssql_n' => get_string('mssql_n', 'install'),
'odbc_mssql' => get_string('odbc_mssql', 'install')),
'dbtype', $INSTALL['dbtype'], '', 'toggledbinfo();') ?>
document.getElementById('mysql').style.display = '';
document.all['mysql'].style.display = '';
document.layers['mysql'].style.display = '';
y donde ponga mysql lo cambio por sqlite???