$value) { // only copy session-prefixed data if (substr($key, 0, strlen(UPLOAD_PREFIX)) == UPLOAD_PREFIX) { $sessionupload[$key] = $value; } } // PMA will kill all variables, so let's use a constant define('SESSIONUPLOAD', serialize($sessionupload)); session_write_close(); // The cookie name is not good anymore since PR #15273 session_name('phpMyAdmin'); session_id($_COOKIE['phpMyAdmin']); } */ define('PMA_MINIMUM_COMMON', 1); require_once 'libraries/common.inc.php'; list( $SESSION_KEY, $upload_id, $plugins ) = ImportAjax::uploadProgressSetup(); /* if (defined('SESSIONUPLOAD')) { // write sessionupload back into the loaded PMA session $sessionupload = unserialize(SESSIONUPLOAD); foreach ($sessionupload as $key => $value) { $_SESSION[$key] = $value; } // remove session upload data that are not set anymore foreach ($_SESSION as $key => $value) { if (substr($key, 0, strlen(UPLOAD_PREFIX)) == UPLOAD_PREFIX && ! isset($sessionupload[$key]) ) { unset($_SESSION[$key]); } } } */ // $_GET["message"] is used for asking for an import message if (isset($_GET["message"]) && $_GET["message"]) { // AJAX requests can't be cached! Core::noCacheHeader(); header('Content-type: text/html'); // wait 0.3 sec before we check for $_SESSION variable, // which is set inside import.php usleep(300000); $maximumTime = ini_get('max_execution_time'); $timestamp = time(); // wait until message is available while ($_SESSION['Import_message']['message'] == null) { // close session before sleeping session_write_close(); // sleep usleep(250000); // 0.25 sec // reopen session session_start(); if ((time() - $timestamp) > $maximumTime) { $_SESSION['Import_message']['message'] = PhpMyAdmin\Message::error( __('Could not load the progress of the import.') )->getDisplay(); break; } } echo $_SESSION['Import_message']['message']; echo '
' , "\n"; } else { ImportAjax::status($_GET["id"]); }