aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/index.php
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2007-06-14 15:03:52 +0000
committerHenry Sudhof <kellanved@phpbb.com>2007-06-14 15:03:52 +0000
commit6813967ae1024d386c6f829256a66f9391791dda (patch)
tree388382dc11f437491eb43a4707b029759691903f /phpBB/install/index.php
parent9693f31404037cce3067f249d1cbbb93ef705cab (diff)
downloadforums-6813967ae1024d386c6f829256a66f9391791dda.tar
forums-6813967ae1024d386c6f829256a66f9391791dda.tar.gz
forums-6813967ae1024d386c6f829256a66f9391791dda.tar.bz2
forums-6813967ae1024d386c6f829256a66f9391791dda.tar.xz
forums-6813967ae1024d386c6f829256a66f9391791dda.zip
Changing the behaviour of the hideonline permission.
Test the current setting before altering the memory limit during install(Bug #12195) And another language var. git-svn-id: file:///svn/phpbb/trunk@7755 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/index.php')
-rwxr-xr-xphpBB/install/index.php25
1 files changed, 24 insertions, 1 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 656b6fed95..5a1b997b73 100755
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -104,7 +104,30 @@ else
// Try to override some limits - maybe it helps some...
@set_time_limit(0);
-@ini_set('memory_limit', '128M');
+$mem_limit = @ini_get('memory_limit');
+if (!empty($mem_limit ))
+{
+ $unit = strtolower(substr($mem_limit, -1, 1));
+ $mem_limit = (int)$mem_limit;
+ if ($unit == 'k')
+ {
+ $mem_limit = floor($mem_limit/1024);
+ }
+ elseif ($unit == 'g')
+ {
+ $mem_limit *= 1024;
+ }
+ elseif (is_numeric($unit))
+ {
+ $mem_limit = floor($mem_limit/1048576);
+ }
+ $mem_limit = max(128, $mem_limit) . 'M';
+}
+else
+{
+ $mem_limit = '128M';
+}
+@ini_set('memory_limit', $mem_limit );
// Include essential scripts
require($phpbb_root_path . 'includes/functions.' . $phpEx);