From 3bac98ef239ac3d6f35ba85d6e8dcbce9af5e46e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 9 Jan 2006 10:24:20 +0000 Subject: [PATCH] Work on 10MB chunks if no memory limit is set (bug #1399477). --- ChangeLog | 4 ++++ import.php | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a9f25b689..fcbe3e363 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2006-01-09 Michal Čihař + * import.php: Work on 10MB chunks if no memory limit is set (bug + #1399477). + 2006-01-07 Marc Delisle * sql.php: bug #1395590 Safari Bookmark query fieldset float problem, thanks to Ryan Schmidt diff --git a/import.php b/import.php index ad9a86ad9..f7efe3419 100644 --- a/import.php +++ b/import.php @@ -171,7 +171,13 @@ if (!empty($bkm_label) && !empty($import_text)) { // We can not read all at once, otherwise we can run out of memory $memory_limit = trim(@ini_get('memory_limit')); // 2 MB as default -if (empty($memory_limit)) $memory_limit = 2 * 1024 * 1024; +if (empty($memory_limit)) { + $memory_limit = 2 * 1024 * 1024; +} +// In case no memory limit we work on 10MB chunks +if ($memory_limit = -1) { + $memory_limit = 10 * 1024 * 1024; +} // Calculate value of the limit if (strtolower(substr($memory_limit, -1)) == 'm') $memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024;