if zlib is disabled it will be turned off automatically later on $config['logcompression'] = 1; // compress log files $config['compression'] = 1; // compression of backup files is possible $config['log_maxsize1'] = 1; $config['log_maxsize2'] = 2; $config['log_maxsize'] = 1048576; $config['optimize_tables_beforedump'] = 1; $config['backup_using_updates'] = 0; $config['empty_db_before_restore'] = 0; $config['stop_with_error'] = 1; // Restore -> stop on errors and show them //Tuning-Corner -> values to process speed calculations $config['minspeed'] = 100; $config['maxspeed'] = 10000; $config['tuning_add'] = 1.1; $config['tuning_sub'] = 0.9; $config['time_buffer'] = 0.75; $config['perlspeed'] = 10000; // nr of records to be read at once //dynamic parameters - read from server configuration $config['safe_mode'] = get_cfg_var('safe_mode'); $config['magic_quotes_gpc'] = get_magic_quotes_gpc(); $config['disabled'] = get_cfg_var('disable_functions'); $config['ob_gzhandler'] = false; @ini_set('magic_quotes_runtime', 0); $config['max_execution_time'] = get_cfg_var('max_execution_time'); if ($config['max_execution_time'] <= 4) { // we didn't get the real value from the server - some deliver "-1" $config['max_execution_time'] = $config['max_execution_time']; } // we don't use more than 30 seconds to avoid brower timeouts if ($config['max_execution_time'] > 30) { $config['max_execution_time'] = 30; } $config['upload_max_filesize'] = get_cfg_var('upload_max_filesize'); // value in Megabytes? If yes create output else leave output untouched if (strpos($config['upload_max_filesize'], 'M')) { $config['upload_max_filesize'] = trim(str_replace('M', '', $config['upload_max_filesize'])); $config['upload_max_filesize'] *= 1024 * 1024; // re-calculate to Bytes // get a string ready to output $config['upload_max_filesize'] = byteOutput($config['upload_max_filesize']); } $config['phpextensions'] = implode(', ', get_loaded_extensions()); // read ram size $m = trim(str_replace('M', '', @ini_get('memory_limit'))); // fallback if ini_get doesn't work if (intval($m) == 0) { $m = trim(str_replace('M', '', get_cfg_var('memory_limit'))); } $config['php_ram'] = $m; // always calculate memory limit // we don't trust the value delivered by server config if < 8 if ($config['php_ram'] < 8) { $config['php_ram'] = 8; } // use maximum of 90% of the memory limit $config['memory_limit'] = round($config['php_ram'] * 1024 * 1024 * 0.9, 0); // server html compression check routine // detect if we can use output compression $config['ob_gzhandler'] = false; $check = array(NULL, false, '', 0, '0'); // Values to check if (in_array( preg_match('/ob_gzhandler|ini_get/i', $config['disabled']), $check ) && in_array(@ini_get('output_handler'), $check) && in_array(@ini_get('zlib.output_compression'), $check) && in_array(@ini_get('zlib.output_handler'), $check)) { } if (function_exists('apache_get_modules') && $config['ob_gzhandler'] == true && in_array('mod_deflate', @apache_get_modules())) { $config['ob_gzhandler'] = false; } //is zlib-compression possible? $extensions = explode(', ', $config['phpextensions']); $disabledExtensions = str_replace(' ', '', $config['disabled']); $disabledExtensions = explode(',', $disabledExtensions); $config['zlib'] = (in_array('zlib', $extensions) && (!in_array('gzopen', $disabledExtensions) || !in_array('gzwrite', $disabledExtensions) || !in_array('gzgets', $disabledExtensions) || !in_array('gzseek', $disabledExtensions) || !in_array('gztell', $disabledExtensions))); if (!$config['zlib']) { // we can't use compression -> turn it off $config['logcompression'] = 0; $config['compression'] = 0; } $config['homepage'] = 'http://mysqldumper.net'; } if (isset($_SESSION['config'])) { $config = $_SESSION['config']; } if (isset($_SESSION['databases'])) { $databases = $_SESSION['databases']; } $config['files']['iconpath'] = './css/' . $config['theme'] . '/icons/'; // config-vars that mustn't be saved in configuration profile, // because they should be get dynamically from the server $configDontsave = Array( 'homepage', 'max_execution_time', 'safe_mode', 'magic_quotes_gpc', 'disabled', 'phpextensions', 'php_ram', 'zlib', 'tuning_add', 'tuning_sub', 'time_buffer', 'perlspeed', 'cron_configurationfile', 'dbconnection', 'version', 'config_file', 'upload_max_filesize', 'cron_samedb', 'paths', 'files', 'ob_gzhandler');