Skip to content
Browse files

Changed max_execution_time and memory_limit php variables

to execute long and heavy scripts (restore and backup)  :-)
Only affects current script execution
  • Loading branch information...
1 parent f911710 commit 55513d3ec5fa5fd2bb92a159306a7559105a959b stronk7 committed Jun 11, 2003
Showing with 15 additions and 3 deletions.
  1. +5 −1 backup/backup.php
  2. +10 −2 backup/restore.php
View
6 backup/backup.php
@@ -74,6 +74,11 @@
//Print form
print_heading("$strcoursebackup: $course->fullname ($course->shortname)");
print_simple_box_start("center", "", "$THEME->cellheading");
+
+ //Adjust some php variables to the execution of this script
+ ini_set("max_execution_time","300");
+ ini_set("memory_limit","56M");
+
//Call the form, depending the step we are
if (!$launch) {
include_once("backup_form.html");
@@ -88,4 +93,3 @@
print_footer();
?>
-
View
12 backup/restore.php
@@ -38,7 +38,12 @@
}
//Check backup_version
- upgrade_backup_db($backup_version,$backup_release,"restore.php");
+ if ($file) {
+ $linkto = "restore.php?file=".$file;
+ } else {
+ $linkto = "restore.php";
+ }
+ upgrade_backup_db($backup_version,$backup_release,$linkto);
//Get strings
$strcourserestore = get_string("courserestore");
@@ -72,6 +77,10 @@
//Print form
print_heading("$strcourserestore: ".basename($file));
print_simple_box_start("center", "", "$THEME->cellheading");
+
+ //Adjust some php variables to the execution of this script
+ ini_set("max_execution_time","300");
+ ini_set("memory_limit","56M");
//Call the form, depending the step we are
if (!$launch) {
@@ -89,4 +98,3 @@
print_footer();
?>
-

0 comments on commit 55513d3

Please sign in to comment.
Something went wrong with that request. Please try again.