- check for magic_quotes_runtime in installation and init-script (for updaters) because of strange behavior of Froxlor if enabled (deactivating it temporarily if so, but better fix php.ini)

This commit is contained in:
Michael Kaufmann (d00p)
2010-09-17 10:33:58 +00:00
parent ef97f63b73
commit 8c5f5ba629
4 changed files with 35 additions and 0 deletions

View File

@@ -182,6 +182,18 @@ function requirement_checks()
status_message('green', 'OK');
}
// Check if magic_quotes_runtime is active
status_message('begin', $lng['install']['phpmagic_quotes_runtime']);
if(get_magic_quotes_runtime())
{
// Deactivate
set_magic_quotes_runtime(false);
status_message('orange', $lng['install']['active'] . '<br />' . $lng['install']['phpmagic_quotes_runtime_description']);
}
else
{
status_message('green', 'OK');
}
status_message('begin', $lng['install']['phpmysql']);

View File

@@ -91,4 +91,11 @@ $lng['install']['click_here_to_refresh'] = 'Re-check';
$lng['install']['click_here_to_continue'] = 'Continue installation';
$lng['install']['froxlor_succ_checks'] = 'All requirements are satisfied';
/*
* Added in Froxlor 0.9.13
*/
$lng['install']['phpmagic_quotes_runtime'] = 'Checking whether magic_quotes_runtime is off';
$lng['install']['active'] = 'no';
$lng['install']['phpmagic_quotes_runtime_description'] = 'PHP setting "magic_quotes_runtime" must be set to "Off" in order to avoid strange behavior of Froxlor. Disabling it for now (this is only temporary, please fix our php.ini).';
?>

View File

@@ -91,4 +91,11 @@ $lng['install']['click_here_to_refresh'] = 'Erneut pr&uuml;fen';
$lng['install']['click_here_to_continue'] = 'Installation fortf&uuml;hren';
$lng['install']['froxlor_succ_checks'] = 'Alle Vorraussetzungen sind erf&uuml;llt';
/*
* Added in Froxlor 0.9.13
*/
$lng['install']['phpmagic_quotes_runtime'] = 'Pr&uuml;fe ob magic_quotes_runtime ausgeschalten ist';
$lng['install']['active'] = 'nein';
$lng['install']['phpmagic_quotes_runtime_description'] = 'Die PHP Einstellung "magic_quotes_runtime" muss deaktiviert sein ("Off"), um merkw&uuml;rdige Verhalten von Froxlor zu umgehen. Sie wurde deaktiviert (nur tempor&auml;r, bitte php.ini anpassen).';
?>

View File

@@ -120,6 +120,15 @@ if(!isset($need_root_db_sql_data) || $need_root_db_sql_data !== true)
$idna_convert = new idna_convert_wrapper();
/**
* disable magic_quotes_runtime if enabled
*/
if(get_magic_quotes_runtime())
{
//Deactivate
set_magic_quotes_runtime(false);
}
/**
* Reverse magic_quotes_gpc=on to have clean GPC data again
*/