Skip to content

Commit

Permalink
Fix: Increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 5, 2011
1 parent 390214e commit 8d8629e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions htdocs/admin/tools/export.php
Expand Up @@ -61,12 +61,18 @@

print_fiche_titre($langs->trans("Backup"),'','setup');

// TODO Define ExecTimeLimit and MemoryLimit
$ExecTimeLimit=600;
if (!empty($ExecTimeLimit)) {
@set_time_limit($ExecTimeLimit);
// Cette page peut etre longue. On augmente le delai autorise.
// Ne fonctionne que si on est pas en safe_mode.
$err=error_reporting();
error_reporting(0); // Disable all errors
//error_reporting(E_ALL);
@set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64
error_reporting($err);
}
if (!empty($MemoryLimit)) {
@ini_set('memory_limit', $MemoryLimit);
@ini_set('memory_limit', $MemoryLimit);
}

// Start with empty buffer
Expand Down Expand Up @@ -181,6 +187,7 @@
$errormsg=$langs->trans("ErrorFailedToWriteInDir");
}
// Get errorstring
// TODO Scan full file instead of 2048 first char to search for "-- dump completed"
if ($compression == 'none') $handle = fopen($outputfile, 'r');
if ($compression == 'gz') $handle = gzopen($outputfile, 'r');
if ($compression == 'bz') $handle = bzopen($outputfile, 'r');
Expand Down

0 comments on commit 8d8629e

Please sign in to comment.