aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/phpbb/install/controller/archive_download.php6
-rw-r--r--phpBB/phpbb/install/helper/config.php6
-rw-r--r--phpBB/phpbb/install/module/install_database/task/create_schema.php13
3 files changed, 19 insertions, 6 deletions
diff --git a/phpBB/phpbb/install/controller/archive_download.php b/phpBB/phpbb/install/controller/archive_download.php
index a0f0ba181d..eabc0a9976 100644
--- a/phpBB/phpbb/install/controller/archive_download.php
+++ b/phpBB/phpbb/install/controller/archive_download.php
@@ -46,9 +46,9 @@ class archive_download
*/
public function conflict_archive()
{
- $filename = $this->installer_config->get('update_file_conflict_archive', false);
+ $filename = $this->installer_config->get('update_file_conflict_archive', '');
- if (!$filename)
+ if (empty($filename))
{
throw new http_exception(404, 'URL_NOT_FOUND');
}
@@ -65,7 +65,7 @@ class archive_download
{
$filename = $this->installer_config->get('update_file_archive', '');
- if (!$filename)
+ if (empty($filename))
{
throw new http_exception(404, 'URL_NOT_FOUND');
}
diff --git a/phpBB/phpbb/install/helper/config.php b/phpBB/phpbb/install/helper/config.php
index 0f0840f470..ab5af86320 100644
--- a/phpBB/phpbb/install/helper/config.php
+++ b/phpBB/phpbb/install/helper/config.php
@@ -157,10 +157,10 @@ class config
{
if ($this->system_data['max_execution_time'] <= 0)
{
- return 1;
+ return PHP_INT_MAX;
}
- return ($this->system_data['start_time'] + $this->system_data['max_execution_time']) - time();
+ return ($this->system_data['start_time'] + $this->system_data['max_execution_time']) - microtime(true);
}
/**
@@ -430,7 +430,7 @@ class config
$this->system_data['max_execution_time'] = $execution_time;
// Set start time
- $this->system_data['start_time'] = time();
+ $this->system_data['start_time'] = microtime(true);
// Get memory limit
$this->system_data['memory_limit'] = $this->php_ini->getBytes('memory_limit');
diff --git a/phpBB/phpbb/install/module/install_database/task/create_schema.php b/phpBB/phpbb/install/module/install_database/task/create_schema.php
index cabb78787f..a5635d5dbe 100644
--- a/phpBB/phpbb/install/module/install_database/task/create_schema.php
+++ b/phpBB/phpbb/install/module/install_database/task/create_schema.php
@@ -13,6 +13,8 @@
namespace phpbb\install\module\install_database\task;
+use phpbb\install\exception\resource_limit_reached_exception;
+
/**
* Create database schema
*/
@@ -106,6 +108,17 @@ class create_schema extends \phpbb\install\task_base
*/
public function run()
{
+ // As this task may take a large amount of time to complete refreshing the page might be necessary for some
+ // server configurations with limited resources
+ if (!$this->config->get('pre_schema_forced_refresh'))
+ {
+ if ($this->config->get_time_remaining() < 5)
+ {
+ $this->config->set('pre_schema_forced_refresh', true);
+ throw new resource_limit_reached_exception();
+ }
+ }
+
$this->db->sql_return_on_error(true);
$dbms = $this->config->get('dbms');