Configurable memory limit (RFE #1373904).
This commit is contained in:
@@ -9,6 +9,8 @@ $Source$
|
||||
* Documentation.html, libraries/common.lib.php,
|
||||
libraries/config.default.php, libraries/database_interface.lib.php: Add
|
||||
support for hiding databases (RFE #1372865).
|
||||
* Documentation.html, export.php, import.php,
|
||||
libraries/config.default.php: Configurable memory limit (RFE #1373904).
|
||||
|
||||
2005-12-14 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||
* libraries/Config.class.php:
|
||||
|
@@ -1003,6 +1003,15 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
|
||||
effect when PHP is running in safe mode.
|
||||
</dd>
|
||||
|
||||
<dt><b><a name="cfg_MemoryLimit"></a>$cfg[MemoryLimit] </b>integer [number of bytes]</dt>
|
||||
<dd>
|
||||
Set the number of bytes a script is allowed to allocate. If number set
|
||||
to zero, no limit is imposed.<br />
|
||||
This setting is used while importing/exporting dump files but has no
|
||||
effect when PHP is running in safe mode.<br />
|
||||
You can also use any string as in php.ini, eg. '16M'.
|
||||
</dd>
|
||||
|
||||
<dt><b><a name="cfg_SkipLockedTables"></a>$cfg[SkipLockedTables] </b>boolean</dt>
|
||||
<dd>
|
||||
Mark used tables and make it possible to show databases with locked
|
||||
|
@@ -35,6 +35,9 @@ if ($export_type == 'server') {
|
||||
* Increase time limit for script execution and initializes some variables
|
||||
*/
|
||||
@set_time_limit($cfg['ExecTimeLimit']);
|
||||
if (!empty($cfg['MemoryLimit'])) {
|
||||
@ini_set('memory_limit', $cfg['MemoryLimit']);
|
||||
}
|
||||
|
||||
// Start with empty buffer
|
||||
$dump_buffer = '';
|
||||
|
@@ -91,6 +91,10 @@ if (isset($db)) {
|
||||
}
|
||||
|
||||
@set_time_limit($cfg['ExecTimeLimit']);
|
||||
if (!empty($cfg['MemoryLimit'])) {
|
||||
@ini_set('memory_limit', $cfg['MemoryLimit']);
|
||||
}
|
||||
|
||||
$timestamp = time();
|
||||
if (isset($allow_interrupt)) {
|
||||
$maximum_time = ini_get('max_execution_time');
|
||||
|
@@ -126,6 +126,7 @@ $cfg['OBGzip'] = 'auto'; // use GZIP output buffering if possib
|
||||
$cfg['PersistentConnections'] = FALSE; // use persistent connections to MySQL database
|
||||
$cfg['ForceSSL'] = FALSE; // whether to force using https
|
||||
$cfg['ExecTimeLimit'] = 300; // maximum execution time in seconds (0 for no limit)
|
||||
$cfg['MemoryLimit'] = 0; // maximum alocated bytes (0 for no limit)
|
||||
$cfg['SkipLockedTables'] = FALSE; // mark used tables, make possible to show
|
||||
// locked tables (since MySQL 3.23.30)
|
||||
$cfg['ShowSQL'] = TRUE; // show SQL queries as run
|
||||
|
Reference in New Issue
Block a user